473,473 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

document.referrer..


if I put alert(document.referrer) in code of a file that was linked from
another it returns blank... pls, need to get document.referrer, don't
why it's not working... read up on oreilly, don't know what I'm doing
wrong.. thank you.. Frances
Jul 23 '05 #1
9 14363
"Frances Del Rio" <fd***@yahoo.com> wrote in message
news:39*************@individual.net...

if I put alert(document.referrer) in code of a file that was linked from
another it returns blank... pls, need to get document.referrer, don't
why it's not working... read up on oreilly, don't know what I'm doing
wrong.. thank you.. Frances


Try "referer".

Also, it may be blocked by many firewalls.
Jul 23 '05 #2
In article <39*************@individual.net>, fd***@yahoo.com enlightened us
with...

if I put alert(document.referrer) in code of a file that was linked from
another it returns blank... pls, need to get document.referrer, don't
why it's not working... read up on oreilly, don't know what I'm doing
wrong.. thank you.. Frances


Referer is spelled (incorrectly, but that's a long story):
document.referer

Note that is should NEVER be relied upon. It is not accurate and can easily
be spoofed. I spoof it all the time to get into stuff. ;)

--
--
~kaeli~
Not one shred of evidence supports the notion that life is
serious.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3


McKirahan wrote:
"Frances Del Rio" <fd***@yahoo.com> wrote in message
news:39*************@individual.net...
if I put alert(document.referrer) in code of a file that was linked from
another it returns blank... pls, need to get document.referrer, don't
why it's not working... read up on oreilly, don't know what I'm doing
wrong.. thank you.. Frances

Try "referer".

Also, it may be blocked by many firewalls.


thank you.. I did try "referer", it returns "undefined".. don't know
about the firewall thing since here at work we use referrer checking
w/asp and it works.. needed to do client-side.. but found another
solution for what I needed to do.. however, still would like to know
why this thing isn't working b/c sooner or later will need to use
client-side again.. thank you again.. Frances

Jul 23 '05 #4
kaeli wrote:

Referer is spelled (incorrectly, but that's a long story):
document.referer


"document.referrer" works for me.

[...]
Mick
Jul 23 '05 #5
I always use "document.referrrrrer". Very nice.

Jul 23 '05 #6
In article <lO*******************@twister.nyroc.rr.com>,
mw***********@rochester.rr.com enlightened us with...
kaeli wrote:

Referer is spelled (incorrectly, but that's a long story):
document.referer


"document.referrer" works for me.

[...]

Sorry, the header is called referer.
Perhaps javascript does use the correct spelling to access it. My bad.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

--
--
~kaeli~
Do not taunt Happy Fun Ball!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #7
Frances Del Rio wrote:

if I put alert(document.referrer) in code of a file that was linked from
another it returns blank... pls, need to get document.referrer, don't
why it's not working... read up on oreilly, don't know what I'm doing
wrong.. thank you.. Frances


SWAG: You are testing it in IE offline. IE does not report the referrer
property when testing a page offline.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #8


Randy Webb wrote:
Frances Del Rio wrote:

if I put alert(document.referrer) in code of a file that was linked
from another it returns blank... pls, need to get document.referrer,
don't why it's not working... read up on oreilly, don't know what I'm
doing wrong.. thank you.. Frances


SWAG: You are testing it in IE offline. IE does not report the referrer
property when testing a page offline.


this is interesting.. had no idea and hadn't thought of that... I WAS
testing locally, and I need it for a CD.. referrer URL would be locally
from same CD.. oh well.. many thanks to all for your responses... Frances

Jul 23 '05 #9
Some virus checker/security/privacy software packages like some
versions of Norton completely block the browser sending the referrer
too.

Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hugo Sousa | last post by:
Hello, I have a page that cannot be accessed by typing is url. It should only be accessed by a link in another web page. The following scrip works fine: <script> <!-- var validreferrals=new...
9
by: goks | last post by:
I'm using document.referrer method for tracking visits on my site. But it seems that, when someone finds my site with google, this method returns only: "google.com/search?q=xxxxx" (good) or...
1
by: kuok benny | last post by:
Hi, I am trying to use the document.referrer to get the referrer of my home page. Occationally, I get the value of 'blockedReferrer'. Actually how this happen, how the client blocked the...
2
by: Goober | last post by:
I have to determine the document.referrer of the individual coming to my site. I want to send everyone not coming from one of those sites to an alternate location (The names below are just used as...
2
by: X l e c t r i c | last post by:
Hi, I'm trying to put the last URL visited to a text input using history.previous for WebTV (because I can't get document.referrer to work with WebTV) and document.referrer for PC. This is for...
1
by: Mike Dee | last post by:
Hi All - I'm having a strange problem I'm wondering if anyone can shed some light on. When I use ASP or ASP.NET code to get the referrer information from the server side, it comes back as null. ...
5
by: Nospam | last post by:
does anyone know if there is anything wrong with this code? <SCRIPT LANGUAGE="JavaScript">document.referrer.indexOf("http://www.example.com") != -1){ ...
1
by: gocre8 | last post by:
hope someone can advise! . . . i'm using this code... <SCRIPT LANGUAGE="JavaScript"> document.write("<INPUT type=hidden NAME=referrer VALUE=" + 'document.referrer' + ">"); </SCRIPT> to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.