473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

lee
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

Dec 7 '06 #1
2 2803
le*@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
Dec 7 '06 #2
pcx99 wrote :
le*@dnuk.com wrote:
><onLoad="setTimeout('PopUp.style.visibility='hidd en';', 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
Dec 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bender | last post by:
Hi, I am wanting to capture an onmousedown event without firing the body tags onload event. Also, if anyone could explain why this happens that would be excellent. I can't see how an...
4
by: Pai | last post by:
hello there, I am trying to rersize the window it works find in IE but doea not work with mozilla window.attachEvent(onload,MWSOnLoad); window.onload = function (MWSOnLoad) { alert('hello');...
6
by: Brian | last post by:
Hi everyone, I'm writing a function (in javascript) that needs to do one thing if the page has not loaded, and another (different) thing if the page has already loaded. I'm looking for a way...
10
by: berg | last post by:
I'm trying to use the onload event to load a series of urls. What I find is that the onload function is only called one time no matter how large the array. Here is the onload function. var...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
2
by: foldface | last post by:
Hi I am aware of how Page_Load and OnLoad work. What I am curious about is -why- there are 2 mechanisms for doing the same thing, in particular why Visual Studio will generate code to implement...
2
by: Martin Honnen | last post by:
I was playing around with canvas support in recent Safari, Mozilla and Opera (only version 9 preview) but run into issues with Safari related to the very old DOM Level 0 Image object for preloading...
6
by: Daz | last post by:
Hello everyone, I would like to open a child window from the parent, and add an onload event listener to the child window which will tell the parent when the document has loaded. As far as I...
7
chunk1978
by: chunk1978 | last post by:
hello, i would like to know if it's possible to hide PHP values that come back empty (text fields) or have a specific value (select menus)... on my form, there are input fields that are...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.