Hi I have a third party form validation that I am running in an onClick event. The link of the button i am using is calling a submitForm() event.
This works fine. The onClick checks the form and the submitForm() does not run if the validation is not met, likewise it runs if it is.
I have added another script that submits the form if the user clicks the return key. However the validation script is not run when this happens, i guess because it is in the onClick event.
I have tried to combine the validate run script into the submitForm() function but this has not worked either.
[CODE]function submitForm(){
YY_checkform(‘EmpLogin’,’AccountNo’,’#q’,’0′,’Enter your Account Number please’,’CompPassword’,’#q’,’0′,’Enter your Password please’); return document.MM_returnValue;
if (document.MM_returnValue==true){document.EmpLogin.submit()}
}
What am I doing wrong?
Thanks
Ro