If you try it in a plain html form, you will know the difference.
That's really useful to use onsubmit="return (validateFields())" in form
tag,
and validate all fields in validateFields() function (If you are not using
validators.).
Return true in validateFields() if all validations are passed.
Return false when there is something wrong in your input.


On 6/26/07, Dave Newton <[EMAIL PROTECTED]> wrote:

--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> For example, onsubmit="return (validateFields())" is
> specified in html <form> tag. If the javascript
> function validateFields() return true, the form will
> submit, otherwise it won't.
>
> It works fine in struts 1.
> But struts2 always add 'return true' in onsubmit
> event. That causes validateFields() useless.

Why / how? Once it hits a return it doesn't make any
difference what's after it.

d.





____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to