Erol, The problem is not with html:button but with 'this'. 'this' refers to the object from which the function is called. So in your first case 'this' refers to the form object whereas in the second case it refers to the button object.
Amitava Basak ASE(T) Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com EROL TEZCAN <[EMAIL PROTECTED]> 07/20/2005 05:19 PM Please respond to "Struts Users Mailing List" <user@struts.apache.org> To sturts_apache_user sturts_apache_user <user@struts.apache.org> cc Subject html:button validation problem Hi all, In my JSP page, I defined a html:form like this. <html:form action="/CagriAcma.do" enctype="multipart/form-data" onsubmit="return validateCagriAcmaFormu(this)" > ........ ....... <html:submit property="kayit" styleClass="buton" value="KAYDET" /> </html:form> It works fine and does client-side validation truly. But when I used to html:button instead of html:submit, it gives an error. <html:form action="/CagriAcma.do" enctype="multipart/form-data" > ........ ....... <html:submit property="kayit" styleClass="buton" value="KAYDET" onclick="return validateCagriAcmaFormu(this)" /> </html:form> Using a html:button tag, how can I do validation with "return validate" or whatelse? Erol __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ForwardSourceID:NT0000618A Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you