|
Post the generated <form> code.
----- Original Message -----
Sent: Monday, July 04, 2005 12:03
PM
Subject: h:commandLink and onsubmit
Hi,
I have a _javascript_ validation onsubmit of my form. When I click the
commandLink the js gets called and throws the alert for validation failure.
But the form submits even when the validation fails. Could you please let me
know if I am not using this correctly.
SCRIPT:
function validate(){ if (..){
}else{
alert('Validation Error');
return false;
}
return true;
}
FORM:
<h:form id="frmSave" >
....
<h:commandLink
action="">
<h:outputText value="Save"
styleClass="button-text"/> </h:commandLink>
</h:form>
Thanks,
Aruna
__________________________________________________ Do You
Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|