"John Blessing" <jb@**REMOVE**T HIS**LbeHelpdes k.com> wrote in message
news:%k******** **********@news fep4-glfd.server.ntl i.net...
"G" <no**********@h ere.com> wrote in message
news:c3******** ***********@new s.demon.co.uk.. . Hello,
I want to launch a pop-under survey when a user leaves my page by
closing the window, but NOT by leaving the page via a hyperlink or form
submission.
Is this easy to accomplish with ASP?
Thanks in advance,
G.
What about if they leave by typing a url?
ASP is server side code and therefore executed before the page is returned
to the client. You **might** be able to do what you want using client-side
javascript.
this is quite tricky because there are so many possible ways to manipulate
browser windows,
you can detect if a window is being closed usign JavaScript, on which you
could launch a tiny popup window to do whatever it is you want to be doing
whan a user exits your site...
but,
what if a user opens a second instance of your site by right-clicking a link
and selecting "browse in new window", and then closes the first window a few
minutes later, while the second one is still used...