In my javascript function, I have the following:
Function checkPassword(form)
{
If ( pass )
{
Form.submit();
}
Else
{
Alert("not match");
}
}
But it doesn't seem to work.
Thanks
--Doug
-----Original Message-----
From: steve rock [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 22, 2005 11:36 AM
To: MyFaces Discussion
Subject: Re: Calling action within javascript
I think onclick=" return checkPassword(this.form)" then return true
from your javascript function to submit, else false to cancle submit.
On Tue, 22 Feb 2005 11:29:21 -0600, Doug Ly <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
> I have a javascript to confirm the passwords are matched which will be
> executed on onclick event of a commandButton tag.
>
> <h:commandButton id="passwordSubmit" value="#{user.password}"
> onclick="checkPassword(this.form)" action="#{user.verify}"/>
>
>
>
> The problem is after onclick event, how can I call the event action in
my
> javascript?
>
> Thanks
>
> --Doug
>
>