title: JavaScript: how to change form action attribute value based on selection?
body: <p>I'm trying to change the form action based on the selected value from a dropdown menu.</p>
  
  <p>Basically, the HTML looks like this:</p>
  
  <pre><code>&lt;form class="search-form" id="search-form" method="post" accept-charset="UTF-8" action="/search/user"&gt;
  &lt;select id="selectsearch" class="form-select" name="selectsearch"&gt;
  &lt;option value="people"&gt;Search people&lt;/option&gt;
  &lt;option value="node"&gt;Search content&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;label&gt;Enter your keywords: &lt;/label&gt;
   &lt;input type="text" class="form-text" value="" size="40" id="edit-keys" name="keys" maxlength="255" /&gt;
  
  &lt;input type="submit" class="form-submit" value="Search" id="edit-submit" name="search"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>If "people" is selected, (which it is by default), the action should be "/search/user", and if content is selected, the action should be "/search/content"</p>
  
  <p>I'm still searching around, but haven't been able to find out how to do this. </p>