Request.ServerVariables("http_referer") not workin

Results 1 to 5 of 5

Thread: Request.ServerVariables("http_referer") not workin

  1. #1
    Big Mac Guest

    Default Request.ServerVariables("http_referer") not workin

    Hi,<BR>I open a new window with the following javascript:<BR><BR>function popupHelp() {<BR> var newWindow ="help.asp", "Help","scrollbars,height=450,width=520");<BR> newWindow.focus()<BR>}<BR><BR>On my help.asp (the new child window) I use Request.ServerVariables("http_referer") but it is blank. Am I doing something wrong or is this not possible? If it is not possible can someone suggest a way for me to find out which page opened up the help.asp without using forms (ie.POST,GET, hidden fields,etc..)<BR><BR>Thank you<BR>

  2. #2
    Jason Miller Guest

    Default RE: Request.ServerVariables(

    It&#039s not possible because you&#039re not following a conventional link. I don&#039t know the exact specifications, but that&#039s the way it works -- typing in a new address as opposed to clicking on a normal href="foo"<BR><BR>You could try a cookie which is updated to whatever the last page your users was looking at... I&#039d recommend using your querystring (skip the form, just go &#060;a href="help.asp?ref=&#060;%= thispage %&#062;&#062;), but if you say it&#039s not an option... bummer.

  3. #3
    Big Mac Guest

    Default QueryString?

    Could you expand on your querystring suggestion? or I guess I should read up on that since I&#039ve heard about it but have never used it.<BR><BR>Thanks for the help Jason

  4. #4
    Big Mac Guest

    Default Using QueryString with JavaScript

    How would I use the querystring in conjunction with JavaScript if the Javascript is used to open a new window? Here is the code:<BR><BR>&#060;script&#062;<BR>function popupHelp() {<BR>var newWindow ="help.asp", "Help","scrollbars,height=450,width=520");<BR>newW indow.focus()<BR>}<BR>&#060;/script&#062;<BR><BR>&#060;a href="help.asp" onClick="popupHelp(); return false"&#062;Help&#060;/a&#062;<BR><BR>In my help.asp, I would like to know which page called help.asp so that I could show the appropriate help. An easy solution would be to have a different help file for each, but I was wondering if I could have just one help file.<BR><BR>Thanks in advance.<BR>

  5. #5
    Join Date
    Dec 1969

    Default RE: Using QueryString with JavaScript

    change "help.asp" to<BR><BR>"help.asp?lastpagename=&#060;%= request.servervariables("PATH_INFO") %&#062;

Posting Permissions

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