View Full Version : close the current window when opening a new popup
12-23-2005, 06:58 AM
How can I close the current window when opening a new popup window through onload method
Means i open a popup in full screen when a page loads, and i want that the original window which opens the popup will close automatically without any notice.
12-23-2005, 07:26 AM
12-23-2005, 07:46 AM
You can simply use the window.close(); function to close the current window.
You have the popup in the onLoad, correct? Just add this to the function you are using to load the new popup:
Is that what you wanted?
12-23-2005, 08:04 AM
12-23-2005, 09:38 PM
You are only allowed to close windows that you opened. If you open a new window then you can close it by calling the close method for that window. If you didb't open the window then you can't close it. Most browsers will either ignore the request or will ask if the person wants to allow you to close the window - many people will then reply NO since they are using that window to browse the web and intend to continue browsing after leaving your site.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.