Reputation: 1769
I'm using simple close browser javascript statement window.close();
but it doesn't work with any browser except IE.
Any help to close browser firefox or opera or chrome. thanks
Upvotes: 1
Views: 721
Reputation: 9323
Javascript can only close a window that it opened, so unless you pop up a new window with js, you aren't going to be able to close it. Which is obviously a good thing.
Upvotes: 2
Reputation: 2457
you can't close a window with javascript that you didn't open by javascript. Browsers correctly interpret this as behavior their users probably don't want. And the user is the browser's customer, not you, so what they want is what the browser will do.
Upvotes: 8