rashley has asked for the wisdom of the Perl Monks concerning the following question:
The problem I'm running into is that when it submits the form, I'm losing my param that's on the submit button.
Here's where I declare my form.
$data .= $cgi->start_form(-method=>'POST', + -action=>$cgi->url(-relative=>1), -onsubmit=>"return disableForm(this);");
And here are my buttons.
$data .= $cgi->submit(-name=>'commit_part', -value=>'Save'); $data .= $cgi->submit(-name=>'cancel_edit_part', -value=>'Cancel'); $data .= $cgi->end_form();
Looking at my logs, it's clear that when I use the -onsubmit=>"return disableForm(this);" I don't get the 'commit_part' that I need when I do elsif ($cgi->param('commit_part')) later on.
How can I call the script and get the param? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: JavaScript and form submission
by Corion (Patriarch) on Nov 21, 2006 at 14:41 UTC | |
by rashley (Scribe) on Nov 21, 2006 at 14:51 UTC | |
by Corion (Patriarch) on Nov 21, 2006 at 14:56 UTC | |
by dorward (Curate) on Nov 22, 2006 at 13:20 UTC | |
by dorward (Curate) on Nov 22, 2006 at 13:18 UTC | |
|
Re: JavaScript and form submission
by themage (Friar) on Nov 21, 2006 at 15:10 UTC | |
|
Re: JavaScript and form submission
by rashley (Scribe) on Nov 21, 2006 at 15:28 UTC | |
|
Re: JavaScript and form submission
by dorward (Curate) on Nov 22, 2006 at 13:24 UTC | |
by rashley (Scribe) on Nov 22, 2006 at 13:30 UTC |