Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Force Object To Load Last, html question
ChronicLoser
post May 1 2005, 10:31 PM
Post #1


Premium Member
Group Icon

Group: Members
Posts: 240
Joined: 13-November 04
From: Arizona
Member No.: 1,356



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 ^_^
Go to the top of the page
 
+Quote Post
dungsport
post May 2 2005, 12:39 PM
Post #2


Member - Active Contributor
Group Icon

Group: Members
Posts: 93
Joined: 21-March 05
Member No.: 3,136



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, smile.gif";
</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, wink.gif
Go to the top of the page
 
+Quote Post
Feedbacker
post Mar 3 2008, 07:21 AM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic Tips and Tricks in HTML(15)
  2. Embedding XML into HTML(2)
  3. Free Shoutbox? HTML, Flash or PHP Code(24)
  4. Where Can I Learn Advanced Html ?(11)
  5. Xhtml Is Not Suppose To Be Text/html(8)
  6. Html Background Tutorial(2)
  7. Where Can I Learn Html Codes ?(8)
  8. Here Are Some Html Tutorial Sites(1)
  9. Get Input From Html/txt File?(2)
  10. How Can You Spice Up Your Basic HTML Site ? Beginner Needs Help(9)
  11. HTML Editor(23)
  12. Need Help With The HTML HR Tag(5)
  13. HTML: Seems Like A Simple Problem, But I'm Baffled!(4)
  14. Where To Find A WML To HTML Converter ?(2)
  15. A First Peep Into Html(5)
  1. Home Videos(4)
  2. Bulletproof HTML: 37 Steps To Perfect Markup(4)
  3. Quick Tips On Html And Css(11)
  4. Firefox Inventing Its Own Html?(9)
  5. Scripts And Html(13)
  6. Stretching My Site Vertically(6)
  7. Html Stats(3)
  8. About Html(15)
  9. Html Table Issue.(18)
  10. Html Emails How?(12)
  11. Sitepoint's Css And Html Reference Sites(2)
  12. Yaml - (x)html/css Framework(2)
  13. Style P And H? Html Tags(1)


 



- Lo-Fi Version Time is now: 6th July 2008 - 06:57 AM