SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Popup on leaving a site?

    Can anyone help please. Oh dear, I'm mentioning the dreadful p word.

    We want to pop up an exit survey, just a general "what did you think of our site" sort of thing.

    I did the code that when you go to another page it pops up, but that's not great.

    Is it possible to, and if so can anyone please tell me how, to have the window popup only when the user closes the window, or navigates to another website. But of course don't want it to pop up when navigating our own website.

    Many thanks
    Antony

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You would have to check the referrer on each page and if it isn't your site than load the popup.
    Wayne Luke
    ------------


  3. #3
    SitePoint Zealot LunaC's Avatar
    Join Date
    Feb 2001
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never tried this one, but it looks like it might be what you're looking for.

    Scroll down to the third script on this page.

  4. #4
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies.

    LunaC, I did get the script from that page, but it doesn't seem to work. Any ideas, or other suggestions?

    I tried to make sense of the code, but couldn't. It is setting the cookie fine, but no popups are appearing.

    Thanks
    Antony


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •