[Javascript] Another popup question

Rodney Myers rodney at aflyingstart.net
Wed Sep 18 06:38:50 CDT 2002


> can I grab the url that the browser is going to?

It _is_ really simple: No.

All history data is tainted for privacy reasons.

Many firewalls suppress HTTP_REFERER, without which in the file header I believe
even document.referer will draw a blank.

Rodney

Gavin Cheyne wrote:

> 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.
>
>





More information about the Javascript mailing list