moospot — 2002-09-04T12:50:05-04:00 — #1
oblig — 2002-09-04T13:01:46-04:00 — #2
Not sure about version support:
I've seen both of these referenced.
moospot — 2002-09-04T13:29:40-04:00 — #3
I'll give those a try and tell you what works.
moospot — 2002-09-04T13:40:46-04:00 — #4
document.referrer is the magic one!
Muchas Gracias, senor
requestcode — 2002-09-04T13:58:35-04:00 — #5
Just a note that if they get to your site by clicking their favorites or by typing it in the location bar document.referrer will be empty.
moospot — 2002-09-04T14:22:47-04:00 — #6
True true. Same thing with ASP or probably any language for that fact. Still, most people will be visiting via a search engine for this site.
mitsubishi — 2002-09-12T08:50:56-04:00 — #7
Cool, just what I wanted to know
Just one thing, if I use frames, the frame won't have the referer will it? Or can I use
mitsubishi — 2002-09-12T09:40:50-04:00 — #8
OK that doesn't work, could someone tell me how to get it pass it on? I tried this and it doesn't work:
document.write('<frame src="given.php?ref=' . document.referrer .'" name="nav" marginwidth="3" marginheight="3" scrolling="auto">' );
moospot — 2002-09-12T10:03:42-04:00 — #9
document.write("<frame src='given.php?ref=" + document.referrer +" name='nav' marginwidth='3' marginheight='3' scrolling='auto'>");
mitsubishi — 2002-09-12T11:17:31-04:00 — #10
Cheers, but still no luck. I tried removing everything else and putting all that's left in the JS, like:
document.write("<frameset cols='170,*' rows='*' border='2' framespacing='0' frameborder='yes'>
<frame src='given.php?ref=" + document.referrer +" name='nav' marginwidth='3' marginheight='3' scrolling='auto'><frame src='index.php?pane=right' name='main' marginwidth='10' marginheight='10' scrolling='auto'>
but nothing, I'm thinking maybe that I can't do this because frames have to be in a file with nothing else, so JS cannot do this?
moospot — 2002-09-12T11:29:37-04:00 — #11
mitsubishi — 2002-09-12T12:59:26-04:00 — #12
I'm clicking the link from an entirely seperate page, with nothing but the link.
I was hoping to create a top-refers script, but this method wouldn't work anyway. I wanted it for a site I'm working on, www.board.tk and .tk uses frames to load your site. Of course I've now realised that I don't actually have any control over the frameset page anyway! I need to use a parent.location thing anyway to get out of frames as it plays havoc with cookies and P3P is hard to write. That is why I wanted parent.referrer to work as I could pass that on, but it looks impossible :bawling: