Hi, Have handled this in another manner in the meanwhile : Have used this function onkeypress() inside the <html:text> where it is supported instead of at form level. Thanks Sergey for your response too ! Will also try that implementation.
Regards. -----Original Message----- From: Sergey Smirnov [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 2:29 PM To: [EMAIL PROTECTED] Subject: Re: URGENT :: Disable enter key in HTML:FORM by using onKeyPress function "Chawla, Yogesh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > In normal forms, we can disable enter key by calling onKeyPress() function > in the form tag. > However, this is not supported in the <html:form> definition for Struts. > > Can anybody give a solution to this ... > If it is really urgent, you can write the following line just after </html:form> <script type="javascript">document.forms[0].onkeypress=function(){return foo();}</script> where foo() is your custom javascript function that return true or false. If it is false, the action will be stopped. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]