Hi Dave,
Thank you.
You are right.
There is an error in my validateFields() function.
It works now.
The "return true" in onsubmit has nothing to do with my problem.
Vincent
On 6/26/07, Dave Newton <[EMAIL PROTECTED]> wrote:
--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> If you try it in a plain
--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> 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,
Um... Yeah, I understand that. What I'm saying is:
onsubmit="return validateFields(); return true;"
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.
Re
--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> For example, onsubmit="return (validateFields())" is
> specified in html 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'
I usually use onsubmit in form tag to do javascript validation.
For example, onsubmit="return (validateFields())" is specified in html
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 'retur
Um... Firstly, it does the same thing.
I think if you move the code to the submit button it renders it as expected.
On 6/26/07, Dave Newton <[EMAIL PROTECTED]> wrote:
--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> Why it renders onsubmit="return (validateFields());
> return true;"
> instead of ons
--- Vincent Lin <[EMAIL PROTECTED]> wrote:
> Why it renders onsubmit="return (validateFields());
> return true;"
> instead of onsubmit="return (validateFields())" ?
> Can I make renders onsubmit="return
> (validateFields())" only?
Probably that's what's in the template. I'm not sure
that it reall
Hi!
I wrote
in my JSP, but struts 2 rendered the following html:
Why it renders onsubmit="return (validateFields()); return true;"
instead of onsubmit="return (validateFields())" ?
Can I make renders onsubmit="return (validateFields())" only?
Thanks!
8 matches
Mail list logo