Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   How do I hide a layer with the onLoad event handler? (http://www.velocityreviews.com/forums/t928594-how-do-i-hide-a-layer-with-the-onload-event-handler.html)

lee@dnuk.com 12-07-2006 03:41 PM

How do I hide a layer with the onLoad event handler?
 
Hello

I need to hide a layer after a set time when the page loads.

Let's say a 1000ms (a second).

Now this works as you'd expect:

<body onLoad="PopUp.style.visibility='hidden';">

Which closes the layer so quick the user cannot see it.
I need it to close after 1 second. I'd thought this would work, but it
does not:

<onLoad="setTimeout('PopUp.style.visibility='hidde n';', 1000);">


Does anyone know how to hide the layer after a set time?

Thanks


pcx99 12-07-2006 04:06 PM

Re: How do I hide a layer with the onLoad event handler?
 
lee@dnuk.com wrote:
> <onLoad="setTimeout('PopUp.style.visibility='hidde n';', 1000);">


<onLoad="setTimeout('PopUp.style.visibility=\'hidd en\';', 1000);">

Quotes within quotes within quotes need to be escaped \'


---------------------------------------------------------------------------
http://www.hunlock.com
$FA

naixn 12-07-2006 06:17 PM

Re: How do I hide a layer with the onLoad event handler?
 
pcx99 wrote :
> lee@dnuk.com wrote:
>> <onLoad="setTimeout('PopUp.style.visibility='hidde n';', 1000);">

>
> <onLoad="setTimeout('PopUp.style.visibility=\'hidd en\';', 1000);">
>
> Quotes within quotes within quotes need to be escaped \'
>
>
> ---------------------------------------------------------------------------
> http://www.hunlock.com
> $FA


Just in case :
<onLoad="setTimeout('PopUp.style.display: \'none\';', 1000);">

--
Naixn
http://fma-fr.net


All times are GMT. The time now is 08:21 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57