Hi,
When I close a window with javascript " window.close(); "
I always get a confirm window. How can I avoid that and close the window immediatly.
Printable View
Hi,
When I close a window with javascript " window.close(); "
I always get a confirm window. How can I avoid that and close the window immediatly.
Himte.
Youll always got a confirm message.
The simple reason is tht the window youre trying to close will not close automatically if its not being opened by Javascript, adn you cant disable that at all i'm afraid...
No way round this, however you could simply resize the window to ZERO and that would keep the window open, not look as embarrassing as a cinfirm but still do the job.
Hope this helps
Kai
It's best to use window.close() only on windows that have been opened using javascript from the main page. It's less annoying that way.