...

View Full Version : Display a layer after delay



vikaspa
06-27-2004, 12:39 PM
Dear All

I want to make a layer visible after say 15 seconds when window opens,
and will remain visible for ever.

How can I do it ...


with regards
Vikas Athavale

Mr J
06-27-2004, 04:51 PM
Something like the following



<script>

setTimeout("document.getElementById(\"mylayer\").style.visibility=\"visible\"",5000)

</script>

<div id="mylayer" style="visibility:hidden">Hello world</div>




Is this layer in the new window?

vikaspa
06-27-2004, 06:41 PM
Dear Mr J

Thanks a lot for the prompt reply

The layer is NOT in new window however ..

What happens in case the layer is in new window ?


Can I define this as a function...like this

<script language=j"avascript ">
function showlayer()
{
setTimeout("document.getElementById(\"mylayer\").style.visibility=\"visible\"",5000)
}
</script>
I want to call this function when window is loaded

How do I call it when window opens..

Please help ...

With regards
Thanking you in advance
Vikas AThavale

Mr J
06-27-2004, 07:39 PM
Put showlayer() in the opening body tag like so


<BODY onload="showlayer()">

vikaspa
06-28-2004, 03:35 AM
Thanks
Thanks

Thanks that was speedy & accurate reply

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum