this doesnt work in IE6!!!!
Main Topics
Browse All TopicsI have searched the net but no luck...
Is there anyway i can load my Java script files and show the download process in the progress bar and when the download is done only then show the web page?
something like yahoo mail beta or windows live mail
thanks
dlogic
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here is a crossbrowser code for a preloader:
var preloaderID = 'preloader';
var contentID = 'mainContent';
var TagList = new Array('div','img');
var IMGqueue = new Array();
var queueItem = 0;
var preloading = false;
function checkURL(URLstring){
if((URLstring != 'none') && (URLstring.length > 0)){
return URLstring.substring(URLstr
}else{
return false;
}
}
function checkBrowser(StyleSheet){
if (document.styleSheets[Styl
return document.styleSheets[Style
else
return document.styleSheets[Style
}
function enqueueBgImg(imgPath){
var isInArray = false;
for(queueItem = 0; queueItem < IMGqueue.length; queueItem++){
if(imgPath == IMGqueue[queueItem]){
isInArray = true;
}
}
if(!isInArray){IMGqueue.pu
}
function parseStyleSheets(tagName, tagClass){
var styleSheet;
for(styleSheet = 0; styleSheet < document.styleSheets.lengt
var AllRules = checkBrowser(styleSheet);
var Rule;
for(Rule = 0; Rule < AllRules.length; Rule++){
var ruleName = AllRules[Rule].selectorTex
if((ruleName.indexOf(tagNa
var RuleBG = AllRules[Rule].style.backg
if(checkURL(RuleBG)){enque
}
}
}
}
function checkIMG(IMGtoLoad){
if(IMGtoLoad.complete){
clearInterval(IMGinterval)
preloading = false;
}
}
function preload(){
if((!preloading) && (queueItem < IMGqueue.length)){
preloading = true;
document.IMG = new Image;
document.IMG.src = IMGqueue[queueItem];
IMGinterval = setInterval("checkIMG(docu
queueItem++;
}
if(queueItem >= IMGqueue.length){
clearInterval(mainInterval
document.getElementById(pr
document.getElementById(co
}
}
function preloadBgImgs(){
var TagName,TAG;
for(TagName = 0; TagName < TagList.length; TagName++){
var TagArray = document.getElementsByTagN
for(TAG = 0; TAG < TagArray.length; TAG++){
var styleBG = TagArray[TAG].style.backgr
if(checkURL(styleBG)){enqu
parseStyleSheets(TagList[T
}
}
queueItem = 0;
mainInterval = setInterval("preload()",50
}
preloaderID: ID of the element that will be visible till the page is totally loaded (a div, something, with a message for the user)
contentID: ID of the element with the desired content, element that must have the setting display:none
TagList: TAGs that will be verified by the script in order to establish if they have a background picture, so that the picture is loaded before the webpage.
In body you must put: onload='preloadBgImgs();'
Regards,
Wesley
Business Accounts
Answer for Membership
by: WesleySaysHiPosted on 2007-01-31 at 17:39:21ID: 18441262
Step 1
ge" CONTENT="en"> lute; width:100%; height:98%; top:0; left:0; background-color:white; font-family:arial,helvetic a; z-index:100} marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"> 2377;</h3> <img src="loading.gif" border="0" alt=""><h3>Please wait</h3></td></tr></table ></div>')
ion ntById?1:0 ("MSIE 5")>-1 && this.dom)?1:0; mentById(d iv).style: bw.ie4?doc ument.all[ div].style :bw.ns4?do cument[div ]:0;
Make a folder named "Test".
Create a GIF file named "loading.gif" showing a moving progress bar. Save it in the folder "Test". A good size would be 214 x 200 pixels.
Step 2
Copy and paste the following code in Notepad and save it as "index.html" in the folder "Test":
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META HTTP-EQUIV="Content-Langua
<title>Test Page</title>
<style type="text/css">
#divLoadCont{position:abso
</style>
<script src="loading.js"></script>
</head>
<body onload="hideIt();fillup()"
<script>
if(bw.bw) document.write('<div id="divLoadCont"><table width="100%" height="95%" align="center" valign="middle"><tr><td width="100%" height="100%" align="center" valign="middle"><h3>Page Loading中で
</script>
<!--WRITE HERE THE CONTENT OF YOUR WEBPAGE-->
</body>
</html>
Step 3
Copy and paste the following code in Notepad and save it as "loading.js" in the folder "Test", leaving the copyright message intact:
/*
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts. This may be used freely as long as this msg is intact!
I will also appriciate any links you could give me.
*/
//Default browsercheck, added to all scripts!
function checkBrowser(){
this.ver=navigator.appVers
this.dom=document.getEleme
this.ie5=(this.ver.indexOf
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
//Hides the div
function hideIt(div){
if(bw.bw){
div="divLoadCont"
obj=bw.dom?document.getEle
obj.visibility='hidden'
}
}
Step 4
Run "index.html" in your browser to test the result.