title: submit button works only on 2nd click after onchange called on input text
body: <p>i have input text field where user can provide some details and on change of text field, ajax function is called to save a data. when user writes something in text field and click on submit button, it calls the ajax function but form is not submitted at the same time. it gets submitted after second click.
  i want if user provides some inputs and click on form submit, ajax should get triggered first and after that form should get submitted without need of one more click.below is sample code:</p>
  
  <pre><code>&lt;form:form name ="samplename" action="submitAction"&gt;
  &lt;form:textarea id="testID" onchange="ajaxmehtod()"&gt;&lt;/form:textarea&gt;
  &lt;input type="button" value="submit"&gt;
  &lt;/form:form&gt;
  </code></pre>