hi all busy developers, I had a form in which two elements are there -
<form>
<table id="nwtbl" width="100%">
<tr>
<td>
<select name="prof_img_type[]">
<option value="">Select Image Caption</option>
<option value="a">ABC</option>
<option value="x">XYZ</option>
<option value="p">PQR</option>
</select>
</td>
<td>
<input type="file" name="prof_img[]" onblur="chkext(this.value,['jpg','jpeg','png']);"/>
</td>
</tr>
<tr>
<td>
<input type="button" value="Add Row" onclick="adnwrw();" />
</td>
<td>
<input type="button" value="Delete Row" onclick="dlrw();" />
</td>
</tr>
here the validation function called on event onblur of file element is working fine. User can add append elements (i.e prof_img_type[] and prof_img[]) dynamically. An User must Select image type & upload file if he adds a row(s). How to do this validation before submitting form. I hope i have given simple description. Thanks in advance.