title: Change form action based on drop down selection
body: <p>Need form to change it's action depending on the selection from a specific drop down menu.
  On change should trigger the script and change the action before user submits. Easier said than done when you're new to JS.. thanks for any help!</p>
  
  <pre><code>Javascript:
  
  &lt;script type="application/javascript"&gt;
  
  function chgAction(form1){
  
      if( recipient=="jordachedotcom_Advertising" )
      {document.form1.action = "/adv_contact.php";}
  
      else if( recipient=="dept_Public_Relations" )
      {document.form1.action = "/pr_contact.php";}
  
      else if( recipient=="dept_Manufacturing" )
      {document.form1.action = "/manuf_contact.php";}
  
      else if( recipient=="dept_Brands" )
      {document.form1.action = "/brands_contact.php";}
  
      else if( recipient=="dept_Holdings" )
      {document.form1.action = "/holdings_contact.php";}
  
      else if( recipient=="dept_Vendor_Inquiry" )
      {document.form1.action = "/vend_contact.php";}
  
      else if( recipient=="dept_Other_Inquiry" )
      {document.form1.action = "/misc_contact.php";}
  
      }
  &lt;/script&gt;
  
  
  FORM HTML:
  
  &lt;form id="form1" name="form1" method="post" action="/"&gt;
  
  Please choose a dept:&lt;br/&gt;
        &lt;select name="recipient" id="recipient" size="1" onChange="javascript:chgAction()"&gt;
        &lt;option value="" selected="selected"&gt;Select&lt;/option&gt;
        &lt;option value="dept_Advertising"&gt;Advertising&lt;/option&gt;
        &lt;option value="dept_Public_Relations"&gt;Public Relations&lt;/option&gt;
        &lt;option value="dept_Manufacturing"&gt;Manufacturing&lt;/option&gt;
        &lt;option value="dept_Brands"&gt;Brands&lt;/option&gt;
        &lt;option value="dept_Holdings"&gt;Holdings&lt;/option&gt;
        &lt;option value="dept_Vendor_Inquiry"&gt;Vendor Inquiry&lt;/option&gt;
        &lt;option value="dept_Other_Inquiry"&gt;Other Inquiry&lt;/option&gt;
        &lt;/select&gt;
  
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>