471,070 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,070 software developers and data experts.

preload a whole site with window.onload problem

i am using this code to preload my site:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3. document.write('<div id="loading"><br><br>The musicase is Loading...</div>');
  4. window.onload=function(){
  5.  
  6.     document.getElementById("loading").style.display="none";
  7.     document.getElementById("central").style.display="block";
  8. }
  9. </script>
  10.  
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?
Nov 29 '06 #1
2 2641
AricC
1,892 Expert 1GB
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.
Nov 29 '06 #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.
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.
Nov 29 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Perttu Pulkkinen | last post: by
7 posts views Thread by MALdito | last post: by
3 posts views Thread by Bob | last post: by
2 posts views Thread by Albert Spencil | last post: by
5 posts views Thread by hoolie | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.