English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am working on a form that needs to use three onSubmit functions. i can get it to work with two, but when i add the third, it ignore it. any help would be greatly appreciated!

2007-08-30 07:46:43 · 3 answers · asked by jkh725 1 in Computers & Internet Programming & Design

3 answers

To do this you really need to use php, it is better at handling the form data. For a form with a submit button (data entry), a request help button (more information required) and a cancel button (backing out) you can do the following :
form
// various input fields.




// At the top of the page you can use if() statements to identify that entries have been made :
if($_POST[submit] =="submit"){
// Routine to habdel the data
}
if($_POST[request] == "Request Help"){
header ("Location : helppage.php target='blank');
// Look up the help page
}
if($_POST[cancel] == "Cancel"){
header ("Location : index.html");
exit;
// Back out
}

2007-08-30 08:14:34 · answer #1 · answered by Anonymous · 0 0

You do not need more than one onSubmit tag. Make the single onSubmit call a function that will then do more than one thing. That is what a normal programmer would do.

2007-08-30 08:07:51 · answer #2 · answered by AnalProgrammer 7 · 0 0

You are calling alert_math1() with two parameters: javascript:alert_math1(x,y) But these parameters are never passed into alert_math(): alert("the number is " + alert_math(z)); If you change the z parameter to x, y in the line above I think you will find your code executes as expected (0:

2016-04-02 07:45:41 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers