PDA

View Full Version : Onsubmit problem



Kal
Mar 1st, 2007, 04:19 PM
Hi guys

i know that this question has been posted alot of times, but i really cant get mine to work.

i am simply trying to call two function in an onsubmit.

i have two functions on is located in the header and the other after the closing form tag, one validates radio buttons whilst theo ther validates dropdowns, text boxes etc.

however i can only get one function to run.

any help would be great.

thanks

Philip M
Mar 1st, 2007, 07:19 PM
Usual advice - check for duplicate function and/or variable names.

glenngv
Mar 1st, 2007, 09:52 PM
<form onsubmit="return validation1(this) && validation2(this);">
Make the 2 onsubmit functions return true if input is valid and false if invalid.

Kal
Mar 2nd, 2007, 10:03 AM
thanks for that guys, i had an onclick event on the submit button and an onsubmit event for just one function, i just got rid of the onsubmit and it works now.

thanks for your help.