document.referrer does not work in 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?
That has nothing to do with popups does it?
How about something like this...
<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.