Reputation: 145
I want to closed current browser tab after pop up 'Thank you' disappeared.
<script language='javascript'>
alert('Thank you.');
window.close();
</script>
But It didn't works and still white blank screen. How to make to close automatically the white blank screen???
Please to help.
Noted: Support for all web browser.
Thanks
Upvotes: 0
Views: 2395
Reputation: 3638
Some browsers don't allow javascript to close window automatically when the windows is NOT opened by script. close needs to be lead by user interactions. if your code is not working, it is probably because of it
Upvotes: 1
Reputation: 5646
if you want to close window in which javascript executes use self.close()
Upvotes: 1