View Full Version : Automatically close a popup after delay
AlistairH
08-05-2005, 01:11 PM
I'm using window.open to open a page in a new popup window. I'd like the window to automatically close after 30 seconds. I presume I need to use the setTimeout function but not sure.
Any ideas?
var popup = window.open("popup.htm");
setTimeout("popup.close()", 30000);
AlistairH
08-05-2005, 02:10 PM
Great Twey!
I stared at this for ages and never got close to such a simple solution. Talk about not seeing the wood for the trees....
Thanks.
Heh, no problem. Sometimes it just needs a different viewpoint.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.