Exit Popup Page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Shi

    #1

    Exit Popup Page

    Hello,

    I need an Exit popup page that when a visitor is on leaving my site it
    will popup. With "onUnLoad" it can work in this way but it also does
    something more that I don't want. When a visitor click links to pages
    within my site the popup will also open. I don't want this. What I need
    is that only when a visitor is leaving my site but current page, the popup
    will open. Anyone have a solution for this please give me a hand.
    Thanks in advance!

    Alex Shi


    --
    =============== =============== =============== =====
    Cell Phone Batteries at 30-50%+ off retail prices!

    =============== =============== =============== =====
  • Littleboy

    #2
    Re: Exit Popup Page

    Hi Alex

    I'm afraid i'm an incredible novice concerning Javascript..

    (tonight I succeeded adapting a simple script to create a script that
    centers a browser window onload, so I thought let's take a look at a
    javascript newsgroup)

    ... but I believe that a simple solution is to use an extra frame in your
    site where you put your "onUnload + popUp" script in. Make it 0 px high if
    you don't want to see it. Now if you make sure you don't use this frame for
    loading any links in, the popup message will only occur once when a visitor
    exits your site.

    Like I said, i'm not a javascriptor, therefor I try to come up with somewhat
    creative solutions ;)

    Greets

    Littleboy

    "Alex Shi" <chpshi@eol.c a> wrote in message
    news:gokPa.143$ gF5.81@nntp-post.primus.ca. ..[color=blue]
    > Hello,
    >
    > I need an Exit popup page that when a visitor is on leaving my site it
    > will popup. With "onUnLoad" it can work in this way but it also does
    > something more that I don't want. When a visitor click links to pages
    > within my site the popup will also open. I don't want this. What I need
    > is that only when a visitor is leaving my site but current page, the popup
    > will open. Anyone have a solution for this please give me a hand.
    > Thanks in advance!
    >
    > Alex Shi
    >
    >
    > --
    > =============== =============== =============== =====
    > Cell Phone Batteries at 30-50%+ off retail prices!
    > http://www.pocellular.com
    > =============== =============== =============== =====[/color]


    Comment

    • JHLeong

      #3
      Re: Exit Popup Page

      "Littleboy" <littleboy@nyde sign_nospam.dk> wrote in message news:<3f0debe3$ 0$13214$edfadb0 f@dread15.news. tele.dk>...[color=blue]
      > Hi Alex
      >
      > I'm afraid i'm an incredible novice concerning Javascript..
      >
      > (tonight I succeeded adapting a simple script to create a script that
      > centers a browser window onload, so I thought let's take a look at a
      > javascript newsgroup)
      >
      > .. but I believe that a simple solution is to use an extra frame in your
      > site where you put your "onUnload + popUp" script in. Make it 0 px high if
      > you don't want to see it. Now if you make sure you don't use this frame for
      > loading any links in, the popup message will only occur once when a visitor
      > exits your site.
      >
      > Like I said, i'm not a javascriptor, therefor I try to come up with somewhat
      > creative solutions ;)
      >
      > Greets
      >
      > Littleboy
      >
      > "Alex Shi" <chpshi@eol.c a> wrote in message
      > news:gokPa.143$ gF5.81@nntp-post.primus.ca. ..[color=green]
      > > Hello,
      > >
      > > I need an Exit popup page that when a visitor is on leaving my site it
      > > will popup. With "onUnLoad" it can work in this way but it also does
      > > something more that I don't want. When a visitor click links to pages
      > > within my site the popup will also open. I don't want this. What I need
      > > is that only when a visitor is leaving my site but current page, the popup
      > > will open. Anyone have a solution for this please give me a hand.
      > > Thanks in advance!
      > >
      > > Alex Shi
      > >
      > >
      > > --
      > > =============== =============== =============== =====
      > > Cell Phone Batteries at 30-50%+ off retail prices!
      > > http://www.pocellular.com
      > > =============== =============== =============== =====[/color][/color]

      something like this:

      <html>
      <head>
      <script type='text/javascript'>
      var closing = true;
      </script>
      </head>
      <body onunload="if(cl osing){popupClo sing();}">
      <a href='xxx.html' onclick="closin g = false;document. location.href =
      this.href;retur n false;">link</a>
      </body>
      </html>

      Comment

      • Littleboy

        #4
        Re: Exit Popup Page

        Hm.. interestting y'all ;)

        Will try!

        Littleboy

        "Littleboy" <littleboy@nyde sign_nospam.dk> wrote in message
        news:3f0debe3$0 $13214$edfadb0f @dread15.news.t ele.dk...[color=blue]
        > Hi Alex
        >
        > I'm afraid i'm an incredible novice concerning Javascript..
        >
        > (tonight I succeeded adapting a simple script to create a script that
        > centers a browser window onload, so I thought let's take a look at a
        > javascript newsgroup)
        >
        > .. but I believe that a simple solution is to use an extra frame in your
        > site where you put your "onUnload + popUp" script in. Make it 0 px high if
        > you don't want to see it. Now if you make sure you don't use this frame[/color]
        for[color=blue]
        > loading any links in, the popup message will only occur once when a[/color]
        visitor[color=blue]
        > exits your site.
        >
        > Like I said, i'm not a javascriptor, therefor I try to come up with[/color]
        somewhat[color=blue]
        > creative solutions ;)
        >
        > Greets
        >
        > Littleboy
        >
        > "Alex Shi" <chpshi@eol.c a> wrote in message
        > news:gokPa.143$ gF5.81@nntp-post.primus.ca. ..[color=green]
        > > Hello,
        > >
        > > I need an Exit popup page that when a visitor is on leaving my site it
        > > will popup. With "onUnLoad" it can work in this way but it also does
        > > something more that I don't want. When a visitor click links to pages
        > > within my site the popup will also open. I don't want this. What I need
        > > is that only when a visitor is leaving my site but current page, the[/color][/color]
        popup[color=blue][color=green]
        > > will open. Anyone have a solution for this please give me a hand.
        > > Thanks in advance!
        > >
        > > Alex Shi
        > >
        > >
        > > --
        > > =============== =============== =============== =====
        > > Cell Phone Batteries at 30-50%+ off retail prices!
        > > http://www.pocellular.com
        > > =============== =============== =============== =====[/color]
        >
        >[/color]


        Comment

        Working...