I found the answer.

There's an attribute in <html:javascript> named method. You can specify a name 
in this attribute such as validateForm. Then specify the onsubmit event of the 
actual form with "return validateForm(this);". After all, the javascript works.

The above solution comes from my colleague. But I wonder know is there any 
document refer to this? Or it should be a common sense?

Talos

----- Original Message ----- 
From: "Antonio Petrelli" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Wednesday, March 26, 2008 5:18 PM
Subject: Re: How to enable the client side validation?


2008/3/26, Chen Chunwei <[EMAIL PROTECTED]>:
>
> Well, the case is that the Javascript code was generated well, but it was
> not triggered.



Well, that's strange. Can you post, the generated HTML and Javascript code?
What browser are you using? Changing browser changes anything?

Antonio

Reply via email to