473,396 Members | 1,608 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,396 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 14007
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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,...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.