| Thejesh GN | A Blog, A Website and A container for all my views with excerpts from technology, travel, films, india, photography, kannada, friends and other interests. I am Thejesh GN. Friends call me Thej..more. |
![]() |
When you try to close the main browser window using the close [ window.close(); ] method. You get the confirmation prompt The Web page you are viewing is trying to close the window. Do you want to close the window? This warnning message appears only if you are trying to close the main browser window and not the popups. To stop this use the following snippet
Comments:
4 Comments posted on "How to close main browser window with out getting warning message"
Mads Kjaer on November 26th, 2007 at 10:06 pm
Although this may be a clever workaround, you should NEVER close, minimize or change the size of a users window(s) without him or her confirming the action first. This is an example of extremely poor usability.
zalifer on December 24th, 2007 at 2:40 am
That would be the coolest thing ever… For someone to exploit with XSS… te he he.
albert gregory on May 5th, 2008 at 1:33 am
Im trying to close a browser window down without success there must be a simple solution.
Mithun Bagchi on June 3rd, 2008 at 7:00 pm
The above script is not working in Mozilla.Could anyone please give me the mozilla compatible code to close the main browser (not popups)? Thanks Post a comment
|