![]() |
I'm wanting to close a window (the main browser) with javascript... this is what I have.
javascript:window.close(); It works. But, I do not want it to prompt the user to confirm the closure. I want it to close without the dialog box comming up. Do you guys know of a work around for this? |
Usually if you have more than one location in the window's histiory, the message will pop up.
I'm not sure if this will work, but try this: window.opener = null (or window.opener = self) window.close() return false Let me know if that works. |
iirc it's a browser feature - sort of, "a script is trying to close this windows, is this ok with you, user?".
|
Thanks for your inputs.
Come to find out the close() will only work if the open() created the window... and in this case, it didn't. |
| All times are GMT -5. The time now is 12:46 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC