title: Redirect Form in Javascript passing Values
body: <p>I want to create a form to redirect user to another page according to 3 values:</p>
  
  <p>1) <code>select</code> firstcurrency</p>
  
  <p>2) <code>select</code> secondcurrency</p>
  
  <p>3) <code>input</code> amount</p>
  
  <p>When form is submitted, user must be redirected to the following address:
  <a href="http://www.example.com/sample/" rel="nofollow noreferrer">http://www.example.com/sample/</a><code>firstcurrency</code>-<code>secondcurrency</code>/?price=<code>amount</code></p>
  
  <p>Here is the form:</p>
  
  <pre><code>&lt;form id="currency"&gt;
  
  &lt;input id="amount" name="amount" class="amount" type="text" value="" /&gt;
  
  &lt;select id="firstcurrency" class="selex" name="firstcurrency"&gt;
  &lt;option value="USD"&gt;USD&lt;/option&gt;
  &lt;option value="EUR"&gt;EUR&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id="secondcurrency" class="selex" name="secondcurrency"&gt;
  &lt;option value="AUD"&gt;AUD&lt;/option&gt;
  &lt;option value="JPY"&gt;JPY&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;input class="button" type="submit" value="Redirect Me"/&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>What Javascript code would you use?</p>