Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

detecting users going to another website

Hi,

If you can help me with this I would greatly appreciate it.
I would like to know how I can detect users going to another website by typing in another URL in their browser and thus leaving our site. To make things a little more complicated : I want to show a popup in that case, but only when the suer comes from certain pages within my site. So not only will I want to detect users from leaving our site, but also wanna know from which page within our site they come.

Like I said, any input will be appreciated !

Thanx in advance,

Patrick Lentz

Comments

  • SouldrinkerSouldrinker Posts: 143Member
    hmzzzz I guess there is a way to do this.

    Just check out the following commands/arguments - it will help I guess:

    document.referrer


    I guess with those two things you can build up some function or website which does what you want, if it does not work - please answer to this and I will look if I'm able to do some sample-sourcecode for ya.

    best regards,

    sebastian mohrenstecher
    executive secretary
    net::allies

    www.net-allies.de
    info@net-allies.de

  • Patrick LentzPatrick Lentz Posts: 2Member
    : hmzzzz I guess there is a way to do this.
    :
    : Just check out the following commands/arguments - it will help I guess:
    :
    : document.referrer
    :
    :
    : I guess with those two things you can build up some function or website which does what you want, if it does not work - please answer to this and I will look if I'm able to do some sample-sourcecode for ya.
    :
    : best regards,
    :
    : sebastian mohrenstecher
    : executive secretary
    : net::allies
    :
    : www.net-allies.de
    : info@net-allies.de
    :
    :
    Hey Sebastian,

    That helped a lot. I went searching and fiddled around some and it turns out that I seem to be able to do what I want with that onUnload event.

    Thanx for your help!

    Patrick Lentz

Sign In or Register to comment.