SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Evangelist Azam.net's Avatar
    Join Date
    Apr 2002
    Location
    UK
    Posts
    479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Pop-up ONLY if click the back button? Please help...

    OK, here's the score. Like many other webmasters, I'm paying huge sums to the pay-per-click search engines to draw traffic to my Website. I spend a considerable period of time writing my site descriptions so that people know what they'll encounter when they click-through to my sites.

    Nevertheless, upon clicking-through, many people press the back-button after only a few seconds. That equals 5 or 10 cents down the drain for me.

    I would like a second bite of the cherry at these surfers. Therefore, could anybody please refer me to the code I can use to ensure a pop-up appears IF somebody doesn't go deeper into my site?

    I know it is possible to ammend the <A HREF> tags to make pop-ups/unders only appear if selected ones are clicked on.

    Any way of actioning a pop-up on the back button please?

    Thank you in advance for any help with this
    Azam Marketing, Inc.
    Award-Winning Digital Marketing and Design Results Since 1997
    Click here to read acclaimed online marketing & design blog

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you can have a popup that appears when the page is exited, but you can't determine what type of exit it is, so it will popup on every instance...
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pop-up ONLY if click the back button? Please help...

    Yes, you may use script.
    Try this:

    <a href="#" onclick="OpenWindow()">Link</a>

    <script language=javascript>
    OpenWindow()(){
    window.open("page1.htm","width=400,height=300,directories=yes");
    </script>

    good luck!
    ______________________

    With best regards,
    Julia Pavlova
    Programmer
    Rapid Internet Development
    AlarIT Inc.
    URL: http://www.alarit.com

  4. #4
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He was referring to the browser back button, not a text link

    I don't think its really possible, to be honest.
    Mike
    It's not who I am underneath, but what I do that defines me.

  5. #5
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There was a thread about this a while back, lemme see if I can find it.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  6. #6
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I can't find the actual one, but some of these might be of use:

    http://www.sitepointforums.com/showt...ht=back+button

    Um I just noticed, you already have a thread about this topic... http://www.sitepointforums.com/showt...ht=back+button

    ...

    http://www.sitepointforums.com/searc...der=descending
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  7. #7
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suppose u could do it with a PHP / JS mix, possibly, do u know PHP? if so it would be


    <script language="javascript">
    <!--
    if (document.history.forward[1] == "<?php echo $_SERVER['HTTP_REFERER'] ?>")
    {
    //Code here
    }
    # -->
    </script>

    i dont know js so can some1 tell me how you get the forward 1 if there is 1?

  8. #8
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only parts of the history that are exposed to the DOM are[list=1][*]length property[*]back method[*]foward method[*]go method[/list=1]That's it. You can determine the length of the history and navigate it, but you cannot determine where you are within it. This is part of my previous statment,
    you can't determine what type of exit it is
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  9. #9
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you know what page they are supposed to come back from? then u can compare the HTTP_REFERER var to that.

  10. #10
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Best process I can think of to achieve close to what you want is this[list=1][*]Check referrer to see if user comes from your CPC site...[*]If yes, then launch pop-under[*]Set timeout to close popunder (5-10 secs or whatever)[*]Clear timeout with onunload event[/list=1]So, what this does if a user closes this browser or goes back within the timeout interval, then the pop-under is not closed...otherwise, a normal user may never see it.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •