473,757 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.ServerV ariables("HTTP_ REFERER")

JW
I use Request.ServerV ariables("HTTP_ REFERER") to get the URL of the referrer
page.

However, if the page that has Request.ServerV ariables("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.ServerV ariables("HTTP_ REFERER")

sVar = TheirURL

aVar = Split(sVar, "/")

sDomain = aVar(2)

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

Response.Write sDomain
%>

Thanks

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

I use Request.ServerV ariables("HTTP_ REFERER") to get the URL of the referrer
page.

However, if the page that has Request.ServerV ariables("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.ServerV ariables("HTTP_ REFERER")

sVar = TheirURL

aVar = Split(sVar, "/")

sDomain = aVar(2)

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

Response.Write sDomain
%>

Thanks

Jon

Jul 19 '05 #2

"JW" <jon_webb@#NOSP AM#yahoo.com> wrote in message
news:bo******** *@hercules.btin ternet.com...
I use Request.ServerV ariables("HTTP_ REFERER") to get the URL of the referrer page.

However, if the page that has Request.ServerV ariables("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="(windo w.open('http://www.compasscomp uting.co.uk/error.asp?'+loc atio
n.href, 'Error',
'width=400,heig ht=575'))">Plea se 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.QuerySt ring("fromPage" )

Tony
Jul 19 '05 #3

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

Similar topics

1
2602
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 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.
2
929
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 with code. retstr = Request.ServerVariables("HTTP_REFERER") if instr(1,ucase(retstr),"STEPPAGE") > 0 then
1
5823
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 width="05%">&nbsp;</td> <TD width="90%" align=center valign=middle colspan=2> <BUTTON TYPE=BUTTON ONCLICK="location.href='<% = Request.ServerVariables("HTTP_REFERER") %>';"
0
1498
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 something to change the value of Request.ServerVariables I would like to reset the value in Request.ServerVariables
9
2978
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 page which should show the referer. I placed a link on www.eleader.com.au/linkref.html and there is a link pointing to www.monitortest.net/referer.asp When I use my computer with XP SP2, and I click on the first link, I get no referer. But when...
1
2549
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 url in dotnet. Thanks,
1
2091
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 our customers uses the WatchDog WebBlocker product. Our web app would throw NullReferenceException errors on the following line (assigning a Hyperlink control's NavigateURL property to the HTTP_REFERER value):
1
3667
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 ("HTTP_REFERER") variables..
0
1814
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 || Request.ServerVariables == null) { Response.Redirect("UserLogin.aspx"); } its working fine. but when i want to go to particular page with querystring, it is not going to particular page, instead it is going...
0
9297
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9735
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7285
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6556
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.