Jump to content

Trying to create a pop-up upon exit


jwwceo

Recommended Posts

I should probably get some sort of rookie hazing for this question, but here goes.  I'm trying to create an exit-survey upon leaving my site -- a pop-up that appears when someone leaves.  I've looked on the net for a tutorial, but so far no luck.  Any ideas?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.