starbones
asked on
show popup onClose page/tab
I need some javascript that will show a popup after user has closed the window(or just before the closing). i have found woring exampes of onUnload onbeforeUnload, but i cant make this works.
Please help.
thanks
Please help.
thanks
ASKER
It needs to open a popup with survey(so people can select why they leave the mid-order process. So it needs to be shown when user clicks on exit button or when trying to go(browse) to another site without finishing order procedure.
if its not possible to open new popup window, i guess i will have to use onbeforeunload, but then how can i check if user is trying to leave to another domain and show the alert? If they just try to browse to another page of my site, then i should display the aert dialog box.
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm glad I could help. Thanks for the grade, the points and the fun question.
bol
bol
If the alert/confirm is what you want then specify the message like ...
window.onbeforeunload = function() { return "Are you sure you want to go?"; };
Let me know if you have a question.
bol