PDA

View Full Version : How to get a window to auto close


artsygal
09-06-2002, 08:52 PM
hi! I want to have a pop up window close after a few seconds. I have this on the page:

<script language="JavaScript">
<!--
function closeWindow(){
window.close
setTimeout("closeWindow",4000)
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="closeWindow()">

Am I at least close???

Fumbling along,
leisa

Roy Sinclair
09-06-2002, 09:00 PM
<script language="JavaScript">
<!--
function closeWindow(){
setTimeout("window.close();",4000)
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="closeWindow()">

artsygal
09-06-2002, 09:08 PM
Woo Hoo! Thanks!

artsygal
09-06-2002, 09:10 PM
whoops. I woo hoo'ed too soon. It works when I "preview in broswer" but does not when I actually run the page. Any ideas?

artsygal
09-06-2002, 09:12 PM
Never mind. The second time it worked. Go figure....

Thanks!
L

artsygal
09-06-2002, 09:25 PM
Never mind. The second time it worked. Go figure....

Thanks!
L