Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How do I hide a layer with the onLoad event handler?

Reply
Thread Tools

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

 
 
lee@dnuk.com
Guest
Posts: n/a
 
      12-07-2006
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

 
Reply With Quote
 
 
 
 
pcx99
Guest
Posts: n/a
 
      12-07-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
naixn
Guest
Posts: n/a
 
      12-07-2006
pcx99 wrote :
> (E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
business layer, data access layer , presentation layer for asp.net using C#.net Dhananjay ASP .Net 1 12-18-2006 11:35 PM
Hide or show toolbar, menubar, etc. from body onload event? Noozer HTML 1 03-22-2006 01:10 PM
Why doesn't frameset onload event get called when each of the frames has an onload? adnanx82@gmail.com Javascript 5 05-15-2005 01:58 PM
base.OnLoad called, OnLoad not executed Fabio R. ASP .Net 0 03-25-2005 01:21 PM



Advertisments