[Home]Track the referring page

HomePage | RecentChanges | Preferences | Newbie Help

[Category JavaScript FAQ]?

In the receiving page, grab document.referrer (the assumption here is that you want to pass it on to a CGI script) --

<script language="JavaScript">
function loadRefURL (){
document.forms[0].theAddr.value = document.referrer;
}
</script> 

</head>
<body ... onLoad="loadRefURL()"><br>

<form action="cgi-bin/myscript.pl" method="post">
Page URL: <input type=text name="theAddr" size=50>
<input type=submit></form>

Comments --
HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited May 7, 2001 7:17 am (diff)
Search:

This FAQ is happily hosted by Betadome Digital Media