-
document.referrer does not work in popup window
Hi,
How do I find out the referral page (URL of the page that sent you to the current page) using javascript, when you're in a popup window?
My situation is like this:
Once the popup is opened, it loads a page eg. page_1.htm
page_1.htm leads to page_2.htm.
In page_2.htm I need to get the URL of the page that lead the user to page_2.htm. So the referall URL in this case should be page_1.htm
How do I do this? I tried but it dosent work. Any idea why it wont work and how I can get it to work?
Thanx
-
SitePoint Enthusiast
That has nothing to do with popups does it?
How about something like this...
page_1.htm:
<a href="page_2.htm" onclick="location.href=this.href+'?referrer='+encodeURIComponent(document.referrer); return false">
Then in page_2.htm you can parse the location object to find out where they came from when they go to page_1.htm.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks