I want the user to attach a file in a browser before allowing a user to click submit. I want disable the submit button when the file is not attached and enable submit button when a file is attached using javascript
Jsp:
<tr id="app[0]" >
<td class="xl" width="50%" id="app1">
<input type="file" name="employeeDischargeTO.appraisalFile[0]" size = "30" contentEditable ="false"/>
</td>
</tr>
<td width="6%" align="right">
<a onclick="fnSubmit('<%=Constants.SUBMIT_BUTTON%>')" onmouseover="fnShowHand(this)"><html:img page="/images/b-HrSubmit.gif" border="0" align="middle"/></a>
</td>