I beg for a favour again. I am learning cgi, and have created a few forms at this stage, and everything seems alright, but I've hit a problem. I know its possible to have two buttons in a cgi form
At the top of my script I have tried this, as suggested on some nodes:$co->submit(-name=>'edit', -value=>'edit'), $co->submit(-name=>'preview', -value=>'preview'),
And where I specify the start of the form I use this:my $name=>$co->param('name'); if ($name eq 'edit'){ $string="http://mywebserver/cgi-bin/edit.cgi"; } elsif($name eq 'preview'){ $string="http://mywebserver/cgi-bin/preview.cgi"; }
The two buttons appear alright in the form, I was hoping that they would each call the different scripts as outlined in the if/elsif statement, but they webpage just seems to refresh. If anybody could point me in the right direction, I would appreciate it a lot.$co->start_form(-method=>'POST', -action=>"$string"),
Thanks,
Jonathan
In reply to Two cgi buttons in the same form by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |