window close

T

Todd Anderson

I need a popup window to close after 10 seconds. I have 2 ideas, and
neither work.
Any help is appreciated.

<META HTTP-EQUIV='Refresh' CONTENT='10;
URL=javascript:this.window.close()'>

or...
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function closeWin() {
window.close();
}
// End -->
</SCRIPT>
</head>

<body bgcolor="#ff0b11" onLoad:"javaScript:closeWin()">
 
L

Lasse Reichstein Nielsen

Todd Anderson said:
I need a popup window to close after 10 seconds. I have 2 ideas, and
neither work.

How don't they work? The window doesn't close, or it closes too soon,
or what?

Try:
<body onload="setTimeout(window.close,10000)">

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top