[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

document.referrer in frames doc



If this is really dumb, forgive me!

I'm trying to post the referring page in a frame in my document.  Here's the
snippet:

<SCRIPT LANGUAGE="JavaScript">       
        var referrer = ""
        referrer = document.referrer
        if (referrer) {
             document.write("<br>Referring Page: ");
             document.write(referrer);
             document.write();
        }
</SCRIPT>

If the file is loaded up directly from a link this works just fine, but when
the file is a frame (named "main" if that helps anyone), referrer is NULL so
nothing happens.  

I've tried using parent.referrer and parent.main.referrer and both return
<undefined> 

all help appreciated.  all flames deserved.

-- 'liz.
elizabeth c. miller
Internet Marketing and Web Design
maxm consulting
508 362-5886       
http://www.oneweb.com/maxm/

--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/