Del
asked on
Redirect on exit from site
I want a better way than the default popup window that comes up when using window.onunload to redirect a user to another page in my site when they attempt to leave.
I have to tell that that is considered 'bad behavior' on the web. If you try to 'kidnap' my browser that way, I will close the browser window to leave your site. You might even end up on a 'malware' list for trying to kidnap users.
ASKER
Actually all I want to do is refresh the page with a 10% off offer. They can still leave after that.
What's wrong with the pop-up then? Actually, you could make a delayed pop-up that offers them 10% off after 5 or 10 seconds. That might encourage them to stay before they decided to leave.
ASKER
I don't like the default popup window because it looks more like an error message than an informative message. I wanted something that looked more professional.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.