Logging refering sites on framed pages

Results 1 to 2 of 2

Thread: Logging refering sites on framed pages

  1. #1
    Join Date
    Dec 1969

    Default Logging refering sites on framed pages

    Hi,<BR><BR>I posted this on the general board, but got no responses.<BR>I&#039;m using the following asp code: Request.ServerVariables("http_referer") to log the site where my users are coming from. The problem: the page is a framed page and because of that the referer is logged either as the parent frame or as the actual frame itself. Is there a way around this, or do I have to use a non-framed page?

  2. #2
    Join Date
    Dec 1969

    Default Easy peasy :) JavaScript though.

    You can get the information using some JavaScript, and then pass it via a QueryString into the ASP page.<BR><BR>If the page is inside a frameset, you can use:<BR>==== START<BR>&#060;script&#062;<BR>document.location.h ref = "logreferer.asp?referer=" + parent.document.referer;<BR>&#060;/script&#062;<BR>==== END<BR><BR>It involves a round-trip to the server, but it should work.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts