Click to See Complete Forum and Search --> : How to avoid Alert when closing parent window


geuis
05-11-2003, 10:24 AM
I understand that if I use window.close() to close a generated pop-up window, I get no alert asking if I want to close it. However, if I do window.close() on the originating window, I always get the 'do you want to close this window' alert.
I am wondering if there is a method that can be used to close the originating window without getting that alert. Thanks.

khalidali63
05-11-2003, 10:36 AM
This is how..:D

http://68.145.35.86/skills/javascripts/CloseParentWindowFromChild.html

Mr J
05-12-2003, 02:44 PM
The following error message is generated:

The webpage you are viewing is trying to close the window.
Do you want to close this window?
A way round this is to add the following to a function

window.opener = top;
window.close()