Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Another popup question


  • From: javascript@xxxxxxxxxx (Gavin Cheyne)
  • Subject: [Javascript] Another popup question
  • Date: Wed, 18 Sep 2002 12:12:56 +0100

Hi,

I've been asked alter a javascript popup so that it triggers when a user
leaves a particular area of the site. This will have to be triggered by
onUnload so that it appears even if the user jumps to another site.

I've got it working with onLoad thus:

    if (document.referrer.indexOf("my_directory") >= 0)
        {
           window.open("url", etc);
        }

My question is this: can I grab the url that the browser is going to, rather
than the one its coming from?

I suspect it is something simple, but I've had my nose in (beginners)
javascript books for days with no joy. Any help gratefully received.

Gavin.