Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onSubmit...firing more than one function...how do you do it?

Status
Not open for further replies.

db97hoops

Programmer
Joined
Oct 11, 2001
Messages
1
Location
US
i'm a newbie programmer or shall i say budding cutnpaster. i'm attempting to validate a form. how does one call multiple functions from a single form 'onSubmit' event handler??? or, is this possible?

thanks,
db97hoops
 
Code:
onSubmit="function1(); function2(); function3()"
 
db97hoops...hey, I always found it easlier to put all the other functions into one final function and call that funtion...
EX:
function 1() {
...
}

function 2() {
...
}

function 3() {
...
}

function all() {
function1;
function2;
function3;
}

And then in the onSubmit just call function all()... I have not failed; I merely found 100,000 different ways of not succeding...
 
I prefer GUJUmOdel's method myself. It's cleaner and, I think, easier to maintain. But hey, difference of opinion is what makes a horse race interesting... Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top