Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:23 AM
JW
Guest
 
Posts: n/a
Default - Request.ServerVariables("HTTP_REFERER") -

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


  #2  
Old July 19th, 2005, 09:23 AM
Aaron Bertrand [MVP]
Guest
 
Posts: n/a
Default Re: - Request.ServerVariables("HTTP_REFERER") -

If you're creating your own popup window, pass the referer in the
querystring.

http://www.aspfaq.com/2169



"JW" <jon_webb@#NOSPAM#yahoo.com> wrote in message
news:bo34gl$2du$1@hercules.btinternet.com...[color=blue]
> Sorry, posting this twice as it tagged on to a spetember posting:
> ---------------------------------------------------------------
>
> I use Request.ServerVariables("HTTP_REFERER") to get the URL of the[/color]
referrer[color=blue]
> page.
>
> However, if the page that has Request.ServerVariables("HTTP_REFERER") is[/color]
in[color=blue]
> 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
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles