Jump to content

Trying to create a pop-up upon exit


jwwceo

Recommended Posts

Thanks guru, I had seen that one before, but I was looking for one that opened only when you left the site - as opposed to just leaving the page where the script is. (They may surf to another internal page - at that point I don't want the script to run)  Has anyone seen anything out there for that?

Oh yes .. you're right.  There's a way to do it though:

 

http://www.webmasterworld.com/forum21/1268.htm

 

I have seen this implemented by a domain parking company.  You can see a sample of how it works at http://www.checkorderexpress.com  (you must look in the frames, the main page is just a frame set).

 

The variable that controls it is doPop, and it is set to 0 by all internal links.  Then the onunload action checks that variable each time.  If it wasn't set to 0 (indicating internal link), then the popup is popped.

 

This may be a problem if someone has multiple windows of your site open and closes one of them.  I don't know how to deal with that situation.

Thanks btherl,

 

that looks like exactly what I'm trying for... cant seem to get this silly onUnload function to work:

 

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF" background="/images/background.gif" onUnload="Open4('/stitching.php')">

 

... i hate onunload

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.