News: Java Script Page Loading....

Home News Photos News Videos News Cartoons News Blogs RSS

Home > Java Scripts Examples and Tutorials > Java Script Page Loading....

Java Script Page Loading....

This is a small script I have found from a website, it will display a loading message before your page is loading, I don't know if you just copy and past it will work, please read the code and understand and then use it.

Friday, Jan 05, 2007 | 2186 Views | Comments [View/Post]

<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">
    function waitPreloadPage() { //DOM
        if (document.getElementById){
            document.getElementById('prepage').style.visibility='hidden';
        }else{
            if (document.layers){ //NS4
                document.prepage.visibility = 'hidden';
            }else { //IE4
                document.all.prepage.style.visibility = 'hidden';
            }
        }
    }
</SCRIPT>

<body onLoad="waitPreloadPage();" topmargin="0" leftmargin="0">

<DIV id="prepage" style="position:absolute; font-family:arial; font-size:16; left:0px; top:0px; height:100%; width:100%;">
    <TABLE width=100% height="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
        <TR>
            <TD>LOADING</TD>
        </TR>
    </TABLE>
</DIV>


Comment on this article
Guidelines: You must register with a social media account such as Facebook, Twitter, Yahoo, etc. to comment on this story. Click on the "Login" button below to choose your login account of choice. We welcome your thoughts, but this is not an open forum. For the sake of all readers, please refrain from the use of obscenities, personal attacks or racial slurs. All comments must remain on topic and cyber bullying will not be tolerated. All comments are subject to our terms of service. Comments that do not comply may be removed. Repeat offenders will lose commenting privileges.
News Other Language
World News
Movie News
Information
Travel News