how to validate the form on the particular button click?
<p>I have four buttons on my page </p>

<pre><code>&lt;button id="opener"  &gt;Submit Timecard&lt;/button&gt;
&lt;button id="cancel" class="cancel"&gt;Cancel&lt;/button&gt;
&lt;input type="button" onclick="AddPO();" class="cancel"  id="btnAddPO" name="btnAddPO" value="Add More Part Details"/&gt;
&lt;input type="button" name="btnAddMoreReciepts" id="btnAddMoreReciepts" value="Add More Reciepts" onclick="AddReciepts();" class="cancel"  /&gt;
</code></pre>

<p>When the Submit Timecard is clicked the form should validate.
for the rest of the buttons it should not so I added the class cancel.
But if I Click btnAddPo or btnAddMoreReciepts first and click the SubmitTimecard  the form is not getting validated.</p>

<p>Can anyone tell me a good solution for this </p>

<p>Thanks,
Sravanthi</p>
