Form events
Form events
(OP)
Hi all,
I have a question about handling form events in CGI -perl.
I have a main form which has a action event(ACTION1) which is triggered when a
submit button(SUBMIT) is pressed. But then I have an additional button in the
main form(ADD)which on click should open a new form(ACTION2) to which i need to
pass values from the main form. Since a form can have only one action
event, I defined a seperate form and stored the definition of ADD
button in a perl variable which i referenced it the main form. But I
find the ADD button still triggers the main form's action event
eventhough it is defnition exists in a different form with action
attribute ACTION2. I guess it is because it is in the scope of main
form. It would be great if anyone can help me on how should i proceed?
Thanks
Carl
I have a question about handling form events in CGI -perl.
I have a main form which has a action event(ACTION1) which is triggered when a
submit button(SUBMIT) is pressed. But then I have an additional button in the
main form(ADD)which on click should open a new form(ACTION2) to which i need to
pass values from the main form. Since a form can have only one action
event, I defined a seperate form and stored the definition of ADD
button in a perl variable which i referenced it the main form. But I
find the ADD button still triggers the main form's action event
eventhough it is defnition exists in a different form with action
attribute ACTION2. I guess it is because it is in the scope of main
form. It would be great if anyone can help me on how should i proceed?
Thanks
Carl
RE: Form events
HTH
--Paul
Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments
RE: Form events
If already use JavaScript, then use only one form and just change the action :
CODE
<input type="submit" value="Ok" onclick="this.form.action='save.pl'">
<input type="submit" value="Add" onclick="this.form.action='add.pl'">
</form>
Feherke.
http://rootshell.be/~feherke/
RE: Form events
Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments