Visual cue while loading page   

 

 Content Editor Web Part

Adding a visual cue (i.e. Loading image or text) while loading the page may help ease the pain of waiting for the page to complete loading.
 
An extremely easy way of implementing this is to put an image after the body tag and then hide it on the onload event. Works well in FireFox and IE.
 
Sample below!

 Code Snippet

   1:  <html>
   2:  <body onload="hideMasterLoad();">
   3:    <img src="/_layouts/images/loading6.gif" id="masterload" alt="Loading..."
   4:   style="display:block; position:absolute;top:45%;left:45%;" />      
   5:   <script type="text/javascript">
   6:      function hideMasterLoad()
   7:      {
   8:      document.getElementById('masterload').style.display = 'none';
   9:      }
  10:  </script>
  11:  </body>
  12:  </html>
Published  on  6/8/2009  by  xsolon
0  Comments  |  Trackback Url  | 0  Links to this post | Bookmark this post with:          
Tags: | Categories:
Technorati Tags:
 

Links to this post

Comments

Title:
Receieve Notification:
Website:
Email:
Comments:

CAPTCHA Image Validation