How to use form name in struts <html:form> tag

Hi,

I want to validate text box value, if it is ordinary html form I would have done like this <form name="myform" action="xxxx.jsp" onsubmit="return validate()">

But am using struts html:form tags. In this case how can I use/specifyname for a form.

Can any one help me.

Thanks

[324 byte] By [vrihari_Que_Ansa] at [2007-10-2 23:56:38]
# 1

The name of the form comes from the actionForm you have defined backing it.

View source on the generated page to see what HTML it constructs.

You are able to use the onsubmit event with the <html:form> tag just like the standard one, so if all you want to do is that:

<html:form action="/saveUser" onsubmit="return validate()">

...

You can also give it a styleId, which will generate an id in the HTML.

See the tag documentation for details: http://struts.apache.org/1.2.x/userGuide/struts-html.html#form

evnafetsa at 2007-7-14 16:43:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...