window.close()
This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script.
http://developer.mozilla.o
Main Topics
Browse All Topics





by: amit_gPosted on 2005-09-26 at 16:50:55ID: 14963436
If you did not open this window as a child window, you cannot close it. Click Tools->Javascript Console. Click on clear. Go back to the browser and refresh the page. Click on submit button. Go back to javascrip console, you should see the error/warning message. There is a hack to overcome this in IE and if you are using it, it won't work in FF or probably future version of IE.