Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>How to excecute 2 different form validation Java scrpt with 1 submit button ?

How to excecute 2 different form validation Java scrpt with 1 submit button ?

skyjockie
10-12-2005, 05:53 PM
Hi,

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.

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

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


 

TOP

For more info

setting a minimum size
Auto Preview of Image 
Refresh with a query s
JS Validation obsolete
Javascript Pop up func
Slide show transitions
I'm a newbie...please!
how to write coding in
Advanced Debug Info 
.js file doesn't work 

News Archive

Adding Graphic To Text
re-direct form after s
pop up window controls
Clock on homepage - He
passing a param from a
Password Procection wi
document.title in same
focus onload 
Counting Wrong from Ri
Help needed on how to 

Related stories:

validate using ONSUBMIT vs ONUNLOAD
data from forms
Cross-Browser Menu Now Working, BUT Now Have FireFox Refresh Loop
How do you write maintainable code?
I want to Resize frames on a button click
Need Cross-Browser Capable Menu / Script - event.srcElement to getElementById
Simply splitting a date up?
Link Extractor Mod to Get Page Domains

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics