preload a whole site with window.onload problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • billkirim
    New Member
    • Nov 2006
    • 25

    #1

    preload a whole site with window.onload problem

    i am using this code to preload my site:
    Code:
    <script type="text/javascript">
    
    document.write('<div id="loading"><br><br>The musicase is Loading...</div>');
    window.onload=function(){
    
    	document.getElementById("loading").style.display="none";
        document.getElementById("central").style.display="block";
    }
    </script>
    in the central div is my whole site
    and in the loading div is a wait message..
    that seems to work on ie but not in mozilla..
    But with a problem in ie.. the fisrt time works fine.. When i am refreshing the site i see the loading message and then i see the elements rendering..
    The first time (without temporary internet files) works fine.. I see the whole site at the moment..

    Any help?
  • AricC
    Recognized Expert Top Contributor
    • Oct 2006
    • 1885

    #2
    The problem could be that you are using window.onload I'm not sure that refreshing the page is considered reloading the page I could be wrong though.

    Comment

    • billkirim
      New Member
      • Nov 2006
      • 25

      #3
      Originally posted by AricC
      The problem could be that you are using window.onload I'm not sure that refreshing the page is considered reloading the page I could be wrong though.
      what can i do to solve this problem ?

      check the url: http://216.246.78.37

      i want to preload the page..
      in mozilla that works whern refreshing but not works on the fisrt time.

      Comment

      Working...