title: Hash retrieval from URL
body: <p>I am trying to setup a form which grabs the hash from the url, then uses that value to determine what radio inputs to check. The latter part is working, but i cannot get the hash retrieval to work.</p>
  
  <pre><code>var url = document.referrer;
  var dec= decodeURIComponent(url.replace(/\+/g, '%20'));
  var hash = url.substring(url.indexOf('?')+1);
  var hash = decodeURI(hash);
  </code></pre>
  
  <p>In firefox console, i try 'console.log(hash)', and simply get a Reference Error saying that 'hash is not defined'.</p>
  
  <p>The entire script is here if needed - <a href="http://pastebin.com/Yq9NbHyz" rel="nofollow noreferrer">http://pastebin.com/Yq9NbHyz</a></p>