title: Different form actions based on select change events
body: <p>I'm using Apache BeeHive. My JSP contains a form (&lt;netui:form&gt;) with a dropdown box (&lt;netui:select&gt;) and a submit button (&lt;netui:button&gt;).  When the submit button is pressed, the form's default action ("doAction1) will be submitted.  <strong>I want a different action ("doAction2") to be submitted when an option is selected from the dropdown.</strong>  (See Figure 1).</p>
  
  <p>My first inclination was to create a JavaScript function that changes the form's <em>action</em> attribute to the new action name and then submits the form (see Figure 2), but this didn't work.  I found out that the  tag translates "doAction1" to a full URL like <code>http://localhost:7001/app/doAction1.do</code>. </p>
  
  <p>The "doAction2" string that I pass to the JavaScript submitForm(form, newAction) method can't convert "doAction2" to an appropriate URL (well it could, but only in a kludgey way).  I went looking for a netui tag that could convert a plain action name into a URL, but I couldn't find one.</p>
  
  <p>So, what's the right way to accomplish this?</p>
  
  <p><strong><em>Figure 1 - JSP code snippet</em></strong></p>
  
  <pre><code>&lt;netui:form action="doAction1" method="post"&gt;
      &lt;netui:select dataSource="actionForm.field1"
                    optionsDataSource="${actionForm.field1Selections}"
                    onChange="submitForm(this.form, 'doAction2')"/&gt;
  
      &lt;p/&gt;
      &lt;netui:button&gt;Submit&lt;/netui:button&gt;
  &lt;/netui:form&gt;
  </code></pre>
  
  <p><strong><em>Figure 2 - JavaScript function to change the form action and submit the form</em></strong></p>
  
  <pre><code>&lt;netui:scriptBlock placement="before"&gt;
  
      function submitForm(form, newAction) {
          form.action = newAction;
          form.submit();              
      }
  
  &lt;/netui:scriptBlock&gt;
  </code></pre>