Jump to content
xisto Community
Sign in to follow this  
ChronicLoser

Force Object To Load Last html question

Recommended Posts

Alright html wizards...i've got a question ^_^ I assume that, like other programming codes, html and php compilers read a code from top to bottom. Say I have a object though...and I want it to load last...how do I do that? Let's just pretend I have an image that I do not want to load until everything else on the webpage is loaded...how can I set that up? Is there perhaps a javascript code for it...or maybe a CSS style I could add onto the object? Or better yet, is it possible to make everything within a div/span/table tag load last?Another thing...if I leave an iframe on the very bottom of my html code, will the iframe load after my main content is loaded, or would it load simultaneously with the original page (the page that has the iframe script on it)? Cause if that's true, it would solve the problem i had above...Heh, I need an answer to either the first question, or the second...cause either one would solve my problem of forcing an html object to load last =/ Thanks to anyone who can help me out here ^_^

Share this post


Link to post
Share on other sites

Okie, it's quite simple. Browsers load your HTML from top to bottom too. However, you can use JavaScript to control this. I guess there must be several ways working around. This is my idea, it should work.Let's say you have some HTML code like this:<html><body><img src="images/banner.jpg">Some text here</body></html>and you want your banner, in this case, loaded last. Then you could do something like this.<html><body><img id="banner" src="images/blank.jpg">Some text here<script language="javascript">document.getElementById("banner").src = "images/banner.jpg";</script></body></html>To do with div/span/table you could do as following:<html><body><img src="images/banner.jpg"><span id="somethingloadlast"></span>Some text here<script language="javascript">document.getElementById("somethingloadlast").innerHTML = "Hello my <b>friend</b>, I am loaded after all, :(";</script></body></html>You can do similar thing for div or table using innerHTML property. You can substitute anything with new HTML code with this technique. Remember to put your script code at very end of your page (just before </body> tab).If you aren't clear at any point, let me know, :D

Share this post


Link to post
Share on other sites

I want to append jsp in anotherjsp

Force Object To Load Last

 

Replying to dungsport

 

Hi I your code I am looking only the text

 

I want to append from feilds like textfeild,checkboxes

Can anybody help me on this

 

 

-reply by arun

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.