Menu
I have a little problem.
I have a page with link: “click here to fill the form”,
You click and new pop-up window appears,
This new window have form and 2 buttons below: “send form”, “cancel”.
I want if user closes window himself (with window close button in upper right corner of the window) this happens:
<body onbeforeunload=”alert(‘Please use CANCEL button’); return false;”>
but if user press “cancel” in form this window is close immediately.
My problem/question is:
How to check if user used close window icon and if so – write alert.
thanks in advance
adam