473,385 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Request.ServerVariables("HTTP_REFERER")

JW
I use Request.ServerVariables("HTTP_REFERER") to get the URL of the referrer
page.

However, if the page that has Request.ServerVariables("HTTP_REFERER") is in
a popup window then the value is blank!!

Can anone assist as to how to solve this problem.

The requesting page is at http://www.theexperts.co.uk/error.htm

The ASP code is:

<%
TheirURL = Request.ServerVariables("HTTP_REFERER")

sVar = TheirURL

aVar = Split(sVar, "/")

sDomain = aVar(2)

If Lcase(Left(sDomain, 4)) = "www." Then
sDomain = Right(sDomain, Len(sDomain) - 4)
End If

Response.Write sDomain
%>

Thanks

Jon
Jul 19 '05 #1
2 14004
JW
Sorry, posting this twice as it tagged on to a spetember posting:
---------------------------------------------------------------

I use Request.ServerVariables("HTTP_REFERER") to get the URL of the referrer
page.

However, if the page that has Request.ServerVariables("HTTP_REFERER") is in
a popup window then the value is blank!!

Can anone assist as to how to solve this problem.

The requesting page is at http://www.theexperts.co.uk/error.htm

The ASP code is:

<%
TheirURL = Request.ServerVariables("HTTP_REFERER")

sVar = TheirURL

aVar = Split(sVar, "/")

sDomain = aVar(2)

If Lcase(Left(sDomain, 4)) = "www." Then
sDomain = Right(sDomain, Len(sDomain) - 4)
End If

Response.Write sDomain
%>

Thanks

Jon

Jul 19 '05 #2

"JW" <jon_webb@#NOSPAM#yahoo.com> wrote in message
news:bo*********@hercules.btinternet.com...
I use Request.ServerVariables("HTTP_REFERER") to get the URL of the referrer page.

However, if the page that has Request.ServerVariables("HTTP_REFERER") is in a popup window then the value is blank!!

Can anone assist as to how to solve this problem.

The requesting page is at http://www.theexperts.co.uk/error.htm

<code snipped>

I'd guess it because you are not clicking a link to get to the page.
Javascript is making a new request for you. You'll get a blank referer if
you type the target url into your address bar.

To get around it I'd suggest that you append the requesting url to a
querystring value to the called asp page and extract it from there.

a href="#"
onclick="(window.open('http://www.compasscomputing.co.uk/error.asp?'+locatio
n.href, 'Error',
'width=400,height=575'))">Please click here to report web site errors, thank
you.</a>

In the error.asp page if you can't find a HTTP_REFERER check
Request.QueryString("fromPage")

Tony
Jul 19 '05 #3

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

Similar topics

1
by: JW | last post by:
Sorry, posting this twice as it tagged on to a spetember posting: --------------------------------------------------------------- I use Request.ServerVariables("HTTP_REFERER") to get the URL of...
2
by: F | last post by:
Hi All I am using Request.ServerVariables("HTTP_REFERER") to refer back in some pages but on clint side some pages refered back and some show error page not found. I dont know whats wrong...
1
by: JJA | last post by:
When my webserver does not process a user's change because of an invalid password, I inform the user and I want to present them a button for a retry: <TR id=continuebuttonrow> <td...
0
by: Daniel | last post by:
how to change the value of Request.ServerVariables on the ser ver? if not possible is there some way to change it by sending back javascript to the client and having the client automaticaly do...
9
by: Nicolae Fieraru | last post by:
Hi All, I try to use Request.ServerVariables("HTTP_REFERER") in a script and I discovered it doesn't work as expected. I use XP with SP2 and I created a link on a web site which points to an asp...
1
by: srinivas | last post by:
Hi, Request.ServerVariables.ToString(); is not working for all browsers.In netscape it isreturning the current url rather than current url.Is there any alternative method to get the previous...
1
by: Elliot M. Rodriguez | last post by:
..NET Framework 1.1 Has anyone reported or experienced NullReferenceException errors when accessing the HTTP_REFERER value on clients that are behind web blocking software? At least one of...
1
by: ppatel | last post by:
I'm using Request.ServerVariables ("HTTP_REFERER") When i move from normal server eg. http:// to secure server eg https:// in VB Script then I've a problem in getting value of Request.ServerVariables...
0
by: dsivakumar | last post by:
In one of my project, i am in one page, if i try to change the url, it should not go to that page, instead, it should go to user login page. i used the code like this: if(Session == null ||...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have 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...

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.