SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2002
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading certain things after the rest of the page?

    How do you make it so certain images or pieces of code get loaded after everythign else? So that it loads everything essential, and then loads some background images...

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You really cannot. Not with server-side languages at least -- they're completely independent of the order in which things load on a given page. You can influence the order in which a page loads however. For instance, if you separate your page into tables (e.g. header table, main content table, footer table), it will tend to load from top to bottom. Additionally, text and such things often times load much more quickly than images. However, it ultimately depends on the browser and the connection speed. Not the language used.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You could use a combination of CSS and JavaScript to do this. Use the style attribute to change the 'visibility' property to hide the object until such time as you wish for the user to see it. Then use JavaScript to make it visible.

    PHP Code:
    <table id='table' style='visibility: hidden'>
    </
    table>

    <
    script>
    function 
    Show()
    {
       
    document.getElementById('table').style.visibility 'visible';
    }
    </script> 


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •