I already have a ‘Close’ button that calls some javascript function. However, if the user just clicks the ‘X’ to close, the function is never called.
Any way to call a function when ‘X’ is clicked, or hide the ‘X’?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the “
onbeforeunload” javascript event to catch when the user attempts to close the browser or navigate away.