title: Can't make jsfiddle code work outside of jsfiddle
body: <p>I found this code on jsfiddle and it works fine, inside of fiddle. But when I try to put it inside of my own HTML file I can't get it to work. I am sure I left something out of the script tag, but I just don't know what. Any input would be greatly appreciated.</p>
  
  <p>Here is the fiddle: <a href="http://fiddle.jshell.net/MEwX6/" rel="nofollow noreferrer">Working Fiddle</a></p>
  
  <p>P.S. The code is supposed to pull info from the URL and fill the form.</p>
  
  <p>-Thanks</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
  &lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" /&gt;
  &lt;title&gt;Parser&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;p&gt;Your first name:
  &lt;br /&gt;&lt;input name="name (awf_first)" id="name (awf_first)" /&gt;&lt;/p&gt;
  
  &lt;p&gt;Your last name:
  &lt;br /&gt;&lt;input name="name (awf_last)" id="name (awf_last)" /&gt;&lt;/p&gt;
  
  &lt;p&gt;Your email:
  &lt;br /&gt;&lt;input name="email" id="email" /&gt;&lt;/p&gt;
  
  &lt;p&gt;Your password:
  &lt;br /&gt;&lt;input name="password" id="password" /&gt;&lt;/p&gt;
  
  
  &lt;script&gt;
  var hashParams = window.location.hash.substr(1).split('&amp;'); // substr(1) to 
  remove the `?`
  for(var i = 0; i &lt; hashParams.length; i++){
  var p = hashParams[i].split('=');
  document.getElementById(p[0]).value = decodeURIComponent(p[1]);;
  }
  &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>