Web Analytics Made Easy -
StatCounter onunload - CodingForum

Announcement

Collapse
No announcement yet.

onunload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • onunload

    I am trying to make a popup that displays only when the user leaves the site, however, the onunload does it for only page it is listed on? Is there a script I can make to popup only when the user leaves the site, and not just the page?
    If you don't do it this year, you will be one year older when you do. "Warren Miller"

  • #2
    Example for what you want:

    ...
    <body onunload="javascript:window.open('adress');">
    ...

    I hope it's effect for you
    Do you know Hakki Ocal ?

    Comment


    • #3
      try this

      The only way I can see as the way round this - as you require the pop up when the site is left is to have a one page site, layered into sections to hold the content of the existing other pages and the unload event on the main page itself as it currently is.

      Sorry if thats of no help but its my thought on your question
      Therapy is expensive, popping bubble wrap is cheap, you choose.

      Comment


      • #4
        They way I have it done on my pop up generator is that when a perosn clicks on a link I have it validate that it is a link....and it will not shhot the pop up window....If the window is shut, it will pop it up....problem is with back button presses and forward button, it will pop up/.......
        Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

        Comment


        • #5
          I think I will just do a popup behind off of the default page, that way when they leave it is there.
          If you don't do it this year, you will be one year older when you do. "Warren Miller"

          Comment

          Working...
          X