Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preloading problems

Status
Not open for further replies.

Henke

Programmer
Nov 15, 2001
1
SE
Is there anyone who knows how to preload your whole site (html+graphics+java-applets+javaclass) in the background and then when all is loaded show the site...? I've found lots of javascripts for preloading images and so on but it doesn't help because I've a java-applet and it seems impossible to get the java applet preloaded...

Anyone got any idea?

Thanks!
 
Its a bit of a fudge and i dont know if its really what your looking for or suitable but you could put the whole page in a <div> and set the style to visibility:hidden

Then all you'd need to do is run a script from an onLoad call in the body tag which changed the style of the div to show the contents something like this:


Code:
<html>
<head>
<script language=&quot;javascript&quot;>
function showPage(divID)
{
document.getElementById(divID).style.visibility=&quot;visible&quot;;
}
</script>
</head>	
<body onLoad=&quot;showPage(mydiv)&quot;>
<div style=&quot;visibility:hidden&quot; id=&quot;mydiv&quot;>
all my page
</div>
</body>
</html>

This would work for IE5 and NN6 but you'd need to modify the script slightly to accomadate IE4 and NN4!

Hope this is helpful

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top