View Full Version : How to excecute 2 different form validation Java scrpt with 1 submit button ?

10-12-2005, 05:53 PM

how do I execute 2 scripts with 1 submit button??

for example I have 2 separate scripts, one for checking that the required fields of a form is entered and another for making sure an important field within your form is filled out correctly.

Both scripts require me to enter this
onSubmit="return formCheck(this)"
onSubmit= "return verify(this.password1, this.password2)"

how do I combine these two together? I have tried these syntax

<form name="suppliersregistrationform" onSubmit="return (formCheck(this),verify(this.password1, this.password2))" >

<form name="suppliersregistrationform" onSubmit="return (formCheck(this)" onSubmit= "return verify(this.password1, this.password2)">

But none of these syntax worked... pls advise.

I would really appreciate any help on this.. thank you very much.

10-12-2005, 06:19 PM
onsubmit = "formCheck(this); verify(this.password1, this.password2)"

10-13-2005, 12:18 AM
onSubmit="return formCheck(this)?verify(this.password1, this.password2):false"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum