try use onsubmit(); instead of onclick()
regds Shilpa -----Original Message----- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 4:12 PM To: 'Struts Users Mailing List' Subject: [OT] form default submit button Hi, This not a struts issue though my project is well attached down to the bones to struts. I am a bit rusty in HTML and I need your advice. I have a login form with username and password fields. The button is built with a table consisting of the graphical edges and the text (retrieved from the resource bundle) in the middle. What do I have to do so when the user is in the username field or password and hits <ENTER> the form will submit. Currently it does not do it and I have to click on the "table" button, whereas with buttons made of <html:submit>.</html:submit> it worked automatically even with more forms on the page where each works the same way autonomously. Here is the fragment of the button in my login form. <-- Start Button --> <div class="btn" onclick="LoginForm.submit();" style="margin-top:10px;"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td class="btnRight"> </td> <td class="btnText"> <fmt:message key="LoginForm.enterBtn"/> </td> <td class="btnLeft"> </td> </tr> </table> </div> <!-- End Button --> Thanks in advance, --Erez -- "This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that ICICI Bank or its subsidiaries and associated companies, (collectively "ICICI Group"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of ICICI Group.Before opening any attachments please check them for viruses and defects."