Java Popup on Leave Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Horrillo

    Java Popup on Leave Problem

    I'm also having trouble with a popup on leave javascript. It seems that it
    pops up when I browse to another page instead of waiting till I completely
    leave my site. What am I doing wrong. Mind you, I'm using Front Page. I have
    it installed at www.over100percent.com. Here's the script I'm putting into
    the head section. Does this need to be on every page?

    I HAVE THIS IN THE HEAD...

    <script language="JavaS cript">

    <!-- Begin
    function leave() {
    window.open('ht tp://over100percent. com/popup_on_leave. htm','','toolba r=no,menubar=no ,location=no,he ight=385,width= 300');
    }
    // End -->
    </script>


    THEN IN THE BODY I HAVE...


    <BODY onUnload="leave ()" style="text-align: left"><div align="left"><f ont
    size="2" face="Arial" color="black">< SCRIPT LANGUAGE="JavaS cript">




    --
    Warmest regards,

    Steve Horrillo, Realtor / CEO / C.Ht.
    http://brokeragenttraining.com (Advanced training for real estate
    professionals)
    http://over100percent.com (Realtors earn over 100 percent)
    http::/hipfsbo.com (A helpful place for the serious home seller or buyer who
    is open to new ideas)
  • microchip

    #2
    Re: Java Popup on Leave Problem

    1.Yet again, you forgot the <!---------begin slashes

    2.That is how the script is supposed to work.

    3.You could put a "Exit Site" button on your site that leads to a page
    that says "Thanks for visiting" or something like that, and you can put
    the script on that page. Other than that, I see no other way using only
    JS.

    Comment

    • Mark Parnell

      #3
      Re: Java Popup on Leave Problem

      Previously in alt.html,comp.l ang.javascript, alt.www.webmaster, Steve
      Horrillo <usenet@stephen horrillo.com> said:


      [color=blue]
      > I'm also having trouble with a popup on leave javascript.[/color]

      They don't trouble me. Doesn't your browser block popups? :-P
      [color=blue]
      > What am I doing wrong.[/color]

      Where do I start? :-)
      [color=blue]
      > Mind you, I'm using Front Page.[/color]

      Well, there's the first answer to your previous question, though not
      necessarily relevant to this post as such.
      [color=blue]
      > It seems that it
      > pops up when I browse to another page instead of waiting till I completely
      > leave my site.[/color]

      Correct.
      "The onunload event occurs when the user agent removes a *document* from
      a window or frame." (emphasis mine)


      How are you supposed to know whether they are leaving the current page
      to go to another page on your site, or to a different site? More to the
      point, why do you think you have a right to know?

      --
      Mark Parnell

      Comment

      • Mark Parnell

        #4
        Re: Java Popup on Leave Problem

        Previously in alt.html,comp.l ang.javascript, alt.www.webmaster, microchip
        <verymicrochip@ gmail.com> said:
        [color=blue]
        > 1.Yet again, you forgot the <!---------begin slashes[/color]

        Just get rid of the HTML comment altogether. It's not necessary.

        --
        Mark Parnell

        Comment

        • Noozer

          #5
          Re: Java Popup on Leave Problem


          "Steve Horrillo" <usenet@stephen horrillo.com> wrote in message
          news:hIKue.825$ wm.508@bignews4 .bellsouth.net. ..[color=blue]
          > I'm also having trouble with a popup on leave javascript. It seems that it
          > pops up when I browse to another page instead of waiting till I completely
          > leave my site. What am I doing wrong. Mind you, I'm using Front Page. I[/color]
          have[color=blue]
          > it installed at www.over100percent.com. Here's the script I'm putting into
          > the head section. Does this need to be on every page?[/color]

          A) Popup's are evil... Why do you feel the need to bother your user?

          B) The script is working as it should... You leave that page (regardless of
          what else is in the browser) so it fires the event.

          C) If you using Frames (also evil) why the need for a popup?

          Thx!


          Comment

          • Lee

            #6
            Re: Java Popup on Leave Problem

            microchip said:[color=blue]
            >
            >1.Yet again, you forgot the <!---------begin slashes[/color]

            It doesn't need them.

            Just get rid of the Begin and End lines completely.
            You're not going to come across a browser that isn't Javascript aware anymore.

            You should also stop calling Javascript "Java" in your subject lines.
            It's like referring to a carpet as a "car".
            Javascript is not a form of Java.

            Comment

            • mark | r

              #7
              Re: Java Popup on Leave Problem

              thats just EVIL

              if someone wants to leaved your site, why annoy them with advertising

              mark

              Sterling Silver Jewellery
              "Steve Horrillo" <usenet@stephen horrillo.com> wrote in message
              news:hIKue.825$ wm.508@bignews4 .bellsouth.net. ..[color=blue]
              > I'm also having trouble with a popup on leave javascript. It seems that it
              > pops up when I browse to another page instead of waiting till I completely
              > leave my site. What am I doing wrong. Mind you, I'm using Front Page. I[/color]
              have[color=blue]
              > it installed at www.over100percent.com. Here's the script I'm putting into
              > the head section. Does this need to be on every page?
              >
              > I HAVE THIS IN THE HEAD...
              >
              > <script language="JavaS cript">
              >
              > <!-- Begin
              > function leave() {
              >[/color]
              window.open('ht tp://over100percent. com/popup_on_leave. htm','','toolba r=no,me
              nubar=no,locati on=no,height=38 5,width=300');[color=blue]
              > }
              > // End -->
              > </script>
              >
              >
              > THEN IN THE BODY I HAVE...
              >
              >
              > <BODY onUnload="leave ()" style="text-align: left"><div align="left"><f ont
              > size="2" face="Arial" color="black">< SCRIPT LANGUAGE="JavaS cript">
              >
              >
              >
              >
              > --
              > Warmest regards,
              >
              > Steve Horrillo, Realtor / CEO / C.Ht.
              > http://brokeragenttraining.com (Advanced training for real estate
              > professionals)
              > http://over100percent.com (Realtors earn over 100 percent)
              > http::/hipfsbo.com (A helpful place for the serious home seller or buyer[/color]
              who[color=blue]
              > is open to new ideas)[/color]


              Comment

              • Stephen Horrillo

                #8
                Re: Java Popup on Leave Problem

                It's not for advertising. It's to remind them to bookmark the site or
                join the email reminder list. Is that "evil" too?

                *** Sent via Developersdex http://www.developersdex.com ***

                Comment

                • Hywel Jenkins

                  #9
                  Re: Java Popup on Leave Problem

                  In article <1119582776.939 861.309600@g43g 2000cwa.googleg roups.com>,
                  verymicrochip@g mail.com says...[color=blue]
                  > 1.Yet again, you forgot the <!---------begin slashes[/color]

                  Yet again you forgot to quote the message to which you're replying.

                  --
                  Hywel

                  Kill the Crazy Frog

                  Comment

                  • Andy Dingley

                    #10
                    Re: Java Popup on Leave Problem

                    On Fri, 24 Jun 2005 03:03:49 GMT, "Steve Horrillo"
                    <usenet@stephen horrillo.com> wrote:
                    [color=blue]
                    >I'm also having trouble with a popup on leave javascript.[/color]

                    Good.
                    [color=blue]
                    >Mind you, I'm using Front Page.[/color]

                    You're made for each other.

                    Comment

                    • Lee

                      #11
                      Re: Java Popup on Leave Problem

                      Stephen Horrillo said:[color=blue]
                      >
                      >It's not for advertising. It's to remind them to bookmark the site or
                      >join the email reminder list. Is that "evil" too?[/color]

                      If not evil, it's at least very rude.
                      Imagine you're walking out the door of a shop and the shopkeeper
                      runs up and grabs your shoulder and asks you to sign his guestbook.

                      Please quote appropriate parts of the message you're responding to.

                      Comment

                      • Travis Newbury

                        #12
                        Re: Java Popup on Leave Problem

                        Steve Horrillo wrote:[color=blue]
                        > I'm also having trouble with a popup on leave javascript..[/color]

                        I assume this is a porn site as they are the kinds of sites that usually
                        use things like this.

                        Not that I know that from experience mind you...

                        --
                        -=tn=-

                        Comment

                        • Dan

                          #13
                          Re: Java Popup on Leave Problem

                          Steve Horrillo wrote:[color=blue]
                          > What am I doing wrong. Mind you, I'm using Front Page.[/color]

                          You've answered your own question, haven't you? :-)

                          --
                          Dan

                          Comment

                          • Neredbojias

                            #14
                            Re: Java Popup on Leave Problem

                            With neither quill nor qualm, Travis Newbury quothed
                            [color=blue]
                            > Steve Horrillo wrote:[color=green]
                            > > I'm also having trouble with a popup on leave javascript..[/color]
                            >
                            > I assume this is a porn site as they are the kinds of sites that usually
                            > use things like this.
                            >
                            > Not that I know that from experience mind you...[/color]

                            Well good guess! Er, I guess.

                            --
                            Neredbojias
                            Contrary to popular belief, it is believable.

                            Comment

                            • Neredbojias

                              #15
                              Re: Java Popup on Leave Problem

                              With neither quill nor qualm, Steve Horrillo quothed
                              [color=blue]
                              > I'm also having trouble with a popup on leave javascript. It seems that it
                              > pops up when I browse to another page instead of waiting till I completely
                              > leave my site. What am I doing wrong.[/color]

                              As somebody else already indicated, how is "it" supposed to know when a
                              user leaves your site as opposed to just the page?

                              It is bad to use pop-ups for negative reasons. I'd venture to say that
                              at least 50% of users block them now because of assholes who install
                              pop-ups and -unders to advertise crap.

                              --
                              Neredbojias
                              Contrary to popular belief, it is believable.

                              Comment

                              Working...