Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q747 How can close a popup window after a delay?

irt.org | Knowledge Base | JavaScript | Window | Q747 [ previous next ]

Q747 How can close a popup window after a delay?

Basically place the following within the new page:

<BODY onLoad="setTimeout('window.close()',5000)">

where 5000 is 5 seconds.

If you don't have access to the new page to amend the body tag, then use the following:

<SCRIPT LANGUAGE="JavaScript"><!--
windowHandle = window.open('page.htm','windowName','width=400,height=400');

setTimeout('windowHandle.close()',5000);
//--></SCRIPT>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.