title: Javascript URL Redirection based on a text box
body: <p>So, I need to create a redirect system based on a code entered. Currently I have:</p>
  
  <pre><code>&lt;form id="form1" name="form1" method="post" action=""&gt; 
    &lt;pre&gt;     &lt;input type="text" name="meow" id="meow" /&gt; &lt;input type="submit" name="submit" id="submit" value="Submit" onclick="javascript:window.location.href('http://foo.exaple.com/bar/' + document.getElementById("meow").value + '.zip')"/&gt;
  </code></pre>
  
  <p>Basically, I need the above script to download a zip file in foo.example.com/bar/, based on a code entered in text box meow.</p>
  
  <p>When I enter code "ugh" into text box meow and click submit, I want to download the file at <a href="http://foo.example.com/bar/ugh.zip" rel="nofollow">http://foo.example.com/bar/ugh.zip</a></p>
  
  <p>How can I do this?</p>