Hi
I had a php page with some datas. When a visitor visit this page I need to show a div until the page loads completely... I tried many but cant.... Please any one help me with right idea or a bit of script ......
Thank you for your time .....
And Sorry is my post is in a wrong place ( means in php instead of Javascript )

Thanks in Advance
Rajeesh

Recommended Answers

All 2 Replies

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01  Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<script language="javascript" type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt() {
 if (dom) {document.getElementById("layer1").style.visibility='hidden';}
 if (document.layers) {document.layers["layer1"].visibility='hide';} }
//--></script>
</head>
<body onload='setTimeout("hideIt()",1000);'>
<div id="layer1" >this is a div that will show till the page is loaded +1 second (see timeout above)</div>
as;lkjasd bla bla blah this is the reast of the page
</body></html>

I use this script
hideit showit declared twice for mozilla and IE DOMs
the external javascripts actually define as
hideit(id) asnd showit(id) as a generic hide/show script

(document.getElementById) ? dom = true : dom = false;
function hideIt(id) {
 if (dom) {document.getElementById(id).style.visibility='hidden';}
 if (document.layers) {document.layers[id].visibility='hide';} }
function showIt(id) {
 if (dom) {document.getElementById(id).style.visibility='visible';}
 if (document.layers) {document.layers[id].visibility='show';} }
onResize="window.location.href = window.location.href"

Thankyou for your support

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.