javascript - Execute two onsubmit functions; second function executes only if first function is true -
i have email form validation script. if first function returns true (no errors in email field), second function execute, url redirect. can combine these 2 functions, need put in the form like, onsubmit="return checkform();"
call second function within first:
function checkform() { // validation logic here if (valid) doredirect(); }
Comments
Post a Comment