Hello people
I have custom error pages and on the 404 page I have included a form for the user to post me a message telling me of the problem...
I want to include the script document.referrer as part of the form and from weeks of trying the only way I have found of getting this to work is by putting document.referrer inside a function, then calling that function from onFocus within a text box.
However, as you can see from my example when the function is called, it displays in what appears as a new page.
My aim is simply to have the script display the referring page inside the textbox so that when the form is submitted I get to know where the dead link came from.
Hope you can help.
this is the code I am using
<script type="text/javascript">
function fnTest()
{
document.write(document.referrer)
}
</script>
Your Previous Page: <input type="text" value="" width="20" onFocus="fnTest()" >
site link:
[
nctfleetlist.co.uk ]