I'm wondering... I'm using a document_onLoad() sub procedure (vbscript)... my intent is that I need it to wait until the page completely loads before it continues...
there is a link on the page that is disabled... and I want to be sure the page loads before I start a script that enables the link. My question is... does anyone know if onLoad will wait till EVERYTHING on the page loads? Including objects (activex)... if necessary, and pre-cached images?
Here's my code...
This "functions" but it loads so fast I can't tell if it really waits till the images load... they're big images... but they're local... I'm usign the images to tell if it will load them and THEN pop up the dialog and fix the link...Code:<style> <!-- #myDiv1 {font-family: verdana; color: red;} #myDiv2 {font-family: verdana; color: blue;} --> </style> <SCRIPT LANGUAGE="javascript"> Image1= new Image(50,60) Image1.src = "test1.bmp" Image2= new Image(70,80) Image2.src = "test2.bmp" Image3= new Image(70,80) Image3.src = "test3.bmp" Image4= new Image(70,80) Image4.src = "test4.bmp" Image5= new Image(70,80) Image5.src = "test5.bmp" Image6= new Image(70,80) Image6.src = "test6.bmp" </SCRIPT> <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript> sub Window_OnLoad() 'window.open "http://www.espn.com" msgbox "Site Has Finished Loading" myDiv2.style.visibility = "hidden" myDiv1.style.visibility = "visible" end sub </SCRIPT> ' all that is in <head></head> ' this is in body <font face="Verdana" size="2"> <div id="myDiv1" style="position: absolute;visibility: hidden;"> <a href="<%=gstrURL%>ActiveOlap/axdActiveOLAP.vbd?...wholebiglongurlhere">Application Loaded! Begin Forecasting</a> </div> <div id="myDiv2" style="position: absolute;"> Please Wait While Application Downloads... </div> </font>
Rock




Reply With Quote