PDA

View Full Version : accessing http_referer in js



Chris
11-30-2005, 02:33 PM
I basically need to write someone's http_referer to a cookie in javascript.

I'm not exactly sure how to access environmental variables like that in JS though. I so very rarely do any JS work its just slipping my mind.

alien
11-30-2005, 11:21 PM
I think it's document.referrer.

Chris
12-01-2005, 06:22 AM
that makes sense, can I access it as parent.document.referrer too?

freekrai
12-01-2005, 07:29 AM
you should be able to.
parent.document.referrer and document.referrer should both work.