Click to See Complete Forum and Search --> : Pop-up window event on last page visited


robsta117
09-05-2003, 07:03 PM
Hi there!

I'm looking for a script to handle a pop-up window event when a visitor exits my site.

I'm posting a survey page and would like to have a "tell us how we're doing" page pop-up before they're allowed to exit the site.

Is this something that can be handled with JavaScript? Cookies?

I know that when a person chooses to exit a site, it could be a tad annoying to get this pop-up request to fill out a mini-survey.

Anyone have any better suggestions how to go about this?

Thanks!
Robsta
:)

Fang
09-06-2003, 07:47 AM
Just a link to "tell us how we're doing" would be friendly,
but if you must: <body onunload="alert('Yet another pop-up');">

Charles
09-06-2003, 07:55 AM
But you'll want to add onclick="self.onunload = function () {}" to all of your internal links.

robsta117
09-06-2003, 11:10 AM
Thanks for the posts.

if you must: <body onunload="alert('Yet another pop-up');">


Does this automatically detect that the user has chosen to exit my domain for another? Or do I only add this script to selected pages - in which case, would I need cookies to keep the pop-up from opening if they've already filled out the survey?

All feedback appreciated.

Thanks -
Robsta
:)