0

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

2
  • this same code worked on my side. maybe you want to loose the language='javascript' Commented Aug 18, 2012 at 1:01
  • You can't close the current tab (in most browsers). Look stackoverflow.com/questions/2076299/… Commented Aug 18, 2012 at 1:14

2 Answers 2

1

if you want to close window in which javascript executes use self.close()

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.