Forum Moderators: open
But one of my client insists.. :(
So, could you give me an example of the pop up window on page quit??
onUnload will not work!! THAT POP UPS even if you browse withing a site..
What I need is the pop up on site quit event.
So, only when somebody closes the winddow, not just the page browse jump.
Would be greatly appreciated!
Thank you!
Use this JS in your head:
---------------------------
var exit=true;
function showPopup(){
if(exit){
var popup = window.open("popup.html",'Help','width=450,height=650,scrollbars=no,resize=no');
}
}
------------------------------Then use this in body:
<body onunload=showPopup() >
AND!! Now add the code below to all your links:
<a onclick=exit=false href=...
The last code makes the pop up not to come up when the user browses your site.. ALL INTERNAL LINKS SHOULD HAVE THIS!
This method has disadvantages, but works in 80%
Thank you all
It fills in some of the details.
I don't think there's any way to catch someone leaving your site with the Back Button