← Foro de Java (Servlets y JSP)

Fallo con formulario de struts html:password

Hilo en el foro de Java (Servlets y JSP) · 19 de Enero del 2006 · 0 respuestas
TT19 de Enero del 2006
Pregunta
Hola:

Tengo un formulario hecho con el taglib html.

<html:form action="/Login" onsubmit="javascript:validateForm(document.forms[0]);">
<tr>
<td width="25%"><span class="textonegrita"><bean:message key="login.username"/>:</span></td>
<td width="75%"><html:text property="username" styleClass="formcampotxt" size="15"/></td>
</tr>
<tr>
<td><span class="textonegrita"><bean:message key="login.password" />:</span></td>
<td><html:password property="password" styleClass="formcampotxt" size="15" /></td>
</tr>
<tr>
<td><span class="textonegrita"><bean:message key="login.idUser" />:</span></td>
<td><html:password property="userCompany" styleClass="formcampotxt" size="15" /></td>
</tr>
<tr>
<td colspan="2" height="5"></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="32%"><img src="resources/images/espacio.gif" width="67" height="20"></td>
<td width="40%" class="fondoazul"> <div align="center"><html:link href="javascript:validateForm(document.forms[0]);" styleClass="linksuperior"><bean:message key="login.button"/></html:link></div></td>
<td width="28%"><img src="resources/images/espacio.gif" width="67" height="20"></td>
</tr>
<tr>
<html:submit style="visibility:hidden" />
</tr>
</html:form>


El formulario quiero que se valide tanto si pulso enter como si pincho sobre la imagen, pero en explorer no funciona cuando pulso enter y me he dado cuenta de que es por el html:password, si los quito funciona bien, pero no se que debo hacer para que funcione con los campos de password.

Muchas Gracias
¿Buscas más hilos como este? Mira el foro de Java (Servlets y JSP) o usa el buscador.