gurpal5686 Posted May 19, 2010 Share Posted May 19, 2010 Hello I am using the javascript to display the loading.gif image before the page load. But it is showing the both loading and other image at the same time. <body onLoad="init()"> <div id="loading" style="width:100%; text-align:center; top:300px; "><img src="../images/loading.gif" /></div> <script> var ld=(document.all); var ns4=document.layers; var ns6=document.getElementById&&!document.all; var ie4=document.all; if (ns4) ld=document.loading; else if (ns6) ld=document.getElementById("loading").style; else if (ie4) ld=document.all.loading.style; function init() { if(ns4){ld.visibility="hidden";} else if (ns6||ie4) ld.display="none"; } </script> <center><img src="../images/ad1.jpeg"</center> </body> Please help me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.