mikebutler
Programmer
I have some code which I use to distinguish the referrer to a framed site. Due to the fact that I want all frames and the frameset to return the same value I use parent.document.referrer to get the referrer. Unfortunately this sometimes return the value of the site.
lets call the referrer and my site
. Sometimes the referrer is but occaisionally it is NULL or I have discovered that when you open in a new window from you get NULL... so I used an if statement to look at this... e.g. window.opener.document.referrer and this resulted in better results but also from some referrers I get a JS error pop up saying that window.opener.document.referrer is null or not a valid object. I'm now spiralling... mainly downwards ;-) can anyone give me some pointers as to what code will guarentee the correct referrer regardless of how is opened. Many thanks too anyone who can end the misery :-|
lets call the referrer and my site