473,769 Members | 7,272 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 14063
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
2604
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
1499
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
2979
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
2551
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
2093
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
3669
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
1815
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
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
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...
0
6675
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
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.