Showing Loading Window

[Total: 0    Average: 0/5]

If you have a page that involves a big number of javascripts which takes a long time to load, you may want to comfort your customer by showing a popup window saying the page is still loading. Let me share my solution. (A real time loading indicator, not

Head Code:

<!-- Hide script from old browsers 
var lw=null;
function initialFunc() { 
 var _d="<html><head><title>Loading...</title></head><body><table width=100% height=100%><tr><td valign=middle align=center>Loading...</td></tr></table></body></html>";
// popup a loading window showing the page is loading. See the HTML for the "loadwin.htm" code 
    lw ="", "_targetLW", "width=400,height=250");;
function closeFunc(){if(lw){lw.close();lw=null;}}
// do your stuff ... 
// Or you add dummy code to loop a counter for millions of times :-)) 
// End hiding script from old browsers --> 

Init Code:


Body Code:

<table border=0 cellspacing=0 cellpadding=0 height=100% width=100%> 
<Td valign="middle" align="center"> 
<img width=95 height=59 src="/js/pic1.gif" v:shapes="_x0000_s1026"> 
Loading. Please wait...

Times Viewed: 5

Leave a Reply

Your email address will not be published. Required fields are marked *