Advertisement

04.03.2006 at 02:56PM PDT, ID: 21800150
[x]
Attachment Details

One form, two submit buttons w/ different javascript validation

Asked by twanlass in Miscellaneous Programming

Tags: two, submit, form, javascript, one

This might be pretty simple, but its been bugging me all day. I have a form that
can be submitted in two states, therefore requiring two differnt validation scripts.
As well, each submit needs to go to a differnt action page :).

Right now, I have submit buttons w/ onClick handelers to send the user to the right page.

I can't seem to get the validation to work properly. Is it possible to pass a variable when the
submit is pressed and there for run only a portion of the validation (if (var is defined) {run validation}; etc?
As well, what would my onSubmit look like?

Thanks!
Start Free Trial
 
 
[+][-]04.03.2006 at 03:08PM PDT, ID: 16365961

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Miscellaneous Programming
Tags: two, submit, form, javascript, one
Sign Up Now!
Solution Provided By: carl_tawn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.03.2006 at 04:51PM PDT, ID: 16366559

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.03.2006 at 12:46PM PDT, ID: 16599554

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05.07.2006 at 12:40AM PDT, ID: 16624326

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32