cpugeek Posted August 6, 2007 Share Posted August 6, 2007 Does anyone know of a simple page loader?all i need is a simple preloader that places a image in the center of a page.&& that doesn't allow interaction with the page until the page is fully loaded.in a nutshell: 1) click on a link2) the preloader script shows a picture while loading the page. Link to comment Share on other sites More sharing options...
jesh Posted August 6, 2007 Share Posted August 6, 2007 Something like this? The centering of the image on the window, and any other style elements you'd want to add, could all be done with CSS on the "preload" div. <html><head><style type="text/css">#content { display: none; }</style><script type="text/javascript">function hideLoading(){ document.getElementById("preload").style.display = "none"; document.getElementById("content").style.display = "block";}window.onload = hideLoading;</script></head><body><div id="preload"><img src="loading.gif" /></div><div id="content"> content goes here...</div></body></html> Link to comment Share on other sites More sharing options...
cpugeek Posted August 6, 2007 Author Share Posted August 6, 2007 that'll do.thnx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.