Web Analytics Made Easy -
StatCounter document.referrer result being truncated! - CodingForum

Announcement

Collapse
No announcement yet.

document.referrer result being truncated!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • document.referrer result being truncated!

    hope i'm posting this in the right place

    i'm using this code...

    Code:
    <SCRIPT LANGUAGE="JavaScript">
     document.write("<INPUT type=hidden NAME=referrer VALUE=" + 'document.referrer' + ">");
    </SCRIPT>
    to generate a hidden field to be submitted with a php formmail script, so i know from which url the visitor has filled in the form. this works well, except for the fact that the url is truncated/corrupted in some way at the end so this....

    gallery/index.php?level=picture&id=256

    ends up like this...

    gallery/index.php?level=picture&id%6

    this is obviously a pain in the arse as the info is of no use unless its the the full, unabridged url. i understand that a % is generated when there is a space in a URL but there isn't a space!

    any advice appreciated
Working...
X