|
There are a few ways to do this, the very simplest of which would be to check the referrer on the form mail script and add it to the email output. However, I am going to assume that you would like to have a fairly easy client side solution - here you go:
In your <FORM> section, add a hidden form field like below:
<INPUT type="hidden" name="pageurl" value="">
Then, add the following script to the <HEAD> section of your page:
<SCRIPT language="javascript">
<!--
function SetVal()
{
document.getElementById("pageurl").value = document.URL;
}
window.onload = SetVal();
//-->
</SCRIPT>
This will set the hidden form field "pageurl" to the value of the current page URL, including the querystring at the end. When this form is sumbitted, the hidden form field is sent with the rest of the values.
Note that this script is compatible with IE AND NN.
Last edited by JoeGoldberg; 03-17-2004 at 09:40 AM..
|