title: Submit JSF form using JQuery and call server side function
body: <p>I can submit my JSF generated form with this code :</p>
  
  <pre><code>&lt;h:commandButton  id="btnValidate" type="submit"  value="#{rb.REGISTER}" action="#{login.registerAccount}" /&gt;
  </code></pre>
  
  <p>but I want to process JS code before submitting my form so I added <code>onClick="test();"</code> with <code>commandButton</code> type to <code>button</code> :</p>
  
  <pre><code>&lt;h:commandButton  id="btnValidate" type="button"  value="#{rb.REGISTER}" action="#{login.registerAccount}" onClick="test();" /&gt;
  </code></pre>
  
  <p>My <code>test</code> function :</p>
  
  <pre><code>function test(){    
     $('#j_idt14\\:register_form').submit();
  </code></pre>
  
  <p>}</p>
  
  <p>With this code, my form is submitted but my <code>login.registerAccount</code> function is no longer called.</p>
  
  <p>How to submit a form with JS and call server side function (attribute <code>action</code>) ? </p>