Getting previous URL value into ASP

by Chuck Evans <Chucke(at)captura.com>

 Date:  Tue, 1 Feb 2000 10:50:42 -0800
 To:  "'HWG Languages'" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
At my site, a user can click a link for our "Info Request" form from any
page on our site. The Info Request form is an HTML form that calls an ASP
program which processes the form contents (ie, mails the content to me). I
want to be able to track which original page the visitor was on when they
clicked the "Info Request" link.

I tried having the ASP script request the HTTP_REFERER environment variable,
but it always returns the URL of the Info Request form, NOT the page before
that. I tried using Javascript to get the referring page using
history.previous (then hide it in a hidden input value on the form) but that
didn't work either.

My script:

<script type="text/javascript">
<!--hide
var referringpage = history.previous;
document.write ("<INPUT TYPE=hidden NAME=history VALUE='" + referringpage +
"'>");
// check the variable by writing to page
document.write ("<p>History variable = " + referringpage);
// -->
</script>

always shows "History variable = undefined".

What am I doing wrong? 

---------------------------------------------------------
Chuck Evans
Web Marketing Manager
Captura Software, Inc.
(425) 424-1155
chucke(at)captura.com
www.captura.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.