Hi ,
I have a html form within a Php . I have three buttons of submit type iside the form . I also have 5 text fields . Depending on the button type i want to have diffrent validations . Right now i am using a onSubmit event and calling a javascript validation funtion . But this function is same for all all the buttons . I tried to call another javascript method on one of the submit buttons . But the Browser is hanging ..
Kindly let me know a way to handle this..
Regards
Deb
JavaScript Button Validation
Moderator: General Moderators
- Johnm
- Forum Contributor
- Posts: 344
- Joined: Mon May 13, 2002 12:05 pm
- Location: Michigan, USA
- Contact:
Post the code for your buttons. Call a different JS validation function for each button but make their type equal to button not submit. Then for the button, use the on click event to call your validation functions and if all is correct in the the validation put form.submit() in the function to submitthe page.
John M
John M