PDA

View Full Version : critical in javascript in struts jsp page


vinothkumarrvk
03-24-2010, 11:08 AM
Friends, i used two TDs in table, one contain the textbox and another contain the submit button which has been disabled in struts. Now i want to enable the submit button whenever user entered some value in the textbox using javascript. Following is my code,

<td valign="top" align="left" style="width: 230px;">
<html:text property="userId" name="userSetupForm" styleClass="formText textSize" maxlength="16" tabindex="3" title="User Id"/>
<html:messages id="errors" property="userId">
<span class="heavyError" title="<bean:write name='errors'/>"><bean:message key="required.error"/></span>
</html:messages>
</td>


<td align="right" colspan="3" height="18px">
<html:submit styleClass="formButton" tabindex="9" title="Submit" onclick="javascript:addUser();"><bean:message key="form.submit"/></html:submit>
</td>

Please help me to find the solution. Thanks in Advance.;)