...

View Full Version : help with HTTP referrer and document.write



this_end_up
08-07-2008, 10:33 PM
Hey guys,

Can somebody help me out?

I have a form that I would like to track a hidden field.

I would like the content of the hidden field be dependent on the referring website...here is an example:

If somebody visits my site from www.cnn.com then I would like the content of the hidden field to be "CNN Site" If someone was to come from my own homepage, www.ownpage.com/index.html then I would like the content within the hidden field to be "My Own"

Can anybody help me out?

I have messed around with some code, but nothing seems to work.

Thanks

rnd me
08-07-2008, 11:43 PM
this works in ff, dont know about others...


<input type="hidden" id="ref" />

<script>
document.getElementById("ref") = document.referrer;
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum