ChronicLoser 0 Report post Posted May 1, 2005 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
dungsport 0 Report post Posted May 2, 2005 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, Share this post Link to post Share on other sites
iGuest 3 Report post Posted March 3, 2008 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