[Javascript] An image loader working in FF but not in Opera, Safari...
Guillaume
javascript at webdesignofficina.com
Wed Jul 13 06:39:47 CDT 2005
Hi list,
I've managed to build with Roger Roelofs an image preloading script.
It's working just fine in Firefox, but Safari and Opera won't catch the
"loading image..." process, and just display the image when the page is
loaded.
Here is the inline script:
<script type="text/javascript">
loader += '<div id="loader" style="display:block;"><p>Loading data...<p/></div>';
document.write(loader);
</script>
<script type="text/javascript">
function checkDone() {
var content = document.getElementById("content");
var img = content.getElementsByTagName("img");
if ( img.complete ) {
document.getElementById('loader').style.display = 'none';
} else {
document.getElementById('loader').style.display = 'none';
}
}
window.onload = checkDone;
</script>
I have setup a test page to understand what's the script about.
<http://www.hablablow.com/devX/loadTest2/testXXX5.htm>
So any help on this is warmly welcome...
Thanks.
Guillaume.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050713/bff34631/attachment.htm>
More information about the Javascript
mailing list