struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yen" <hyw...@leadingside.com>
Subject submit with the <Enter> from the keyboard ??
Date Mon, 21 Mar 2005 06:35:31 GMT
When I hit on the <enter> key, it wont submit the form unless I use the 
mouse to click on the button. I tried with both method, it doesnt work. 
Unless I put both codes together, and it will work..
any idea?

Method 1
<input type="text" name="fullName" value="Enter Name Here" 
onFocus="javascript:clickme();"/>
<input type="button" class="btn2" value="<bean:message 
key="common.button.search"/>" 
onclick="javascript:doSubmitForm('showList')"/>

Method 2
 <html:text property="fullName" value="Enter Name Here" 
onFocus="javascript:clickme();"/>
<html:button property="action" 
onclick="javascript:doSubmitForm('showList1')">
  <bean:message key="common.button.search"/>
</html:button>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message