kmullin5016 has asked for the wisdom of the Perl Monks concerning the following question:
I spent several days on this problem, and never fixed it. Perhaps, a wise perl monk can see my problem and explain it to me.
I have a form that I use this code for:
print $cgi->start_form(-name=>'new', -method=>"$FORM_METHOD", -action=>'secalert_display.cgi', -target=>'_top'); print $cgi->submit(-value=>'Enter a new record for a Secalert'); print $cgi->hidden(-name=>'MODE', -value=>'new'); print $cgi->endform;
It compiles cleanly, but at runtime (when I execute the CGI from a browser) and click on the 'Enter a new record for a Secalert' button, It doesn't work. The best I can figure is that it doesn NOT sent the hidden field along with the rest of the stuff.
Now, if I replace this CGI.pm code with simple print statements, as in:
print("<form name='new' method='$FORM_METHOD' action='secalert_display +.cgi' target='_top'>\n"); print("<input type='submit' value='Enter a new record for a Secalert'> +"); print("<input type='hidden' name='MODE' value='new'>\n"); print("</form>\n");
It works fine. Can somebody see what the problem with the CGI.pm version is?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Whats wrong with this code.
by davorg (Chancellor) on Feb 20, 2007 at 16:50 UTC | |
|
Re: Whats wrong with this code.
by ikegami (Patriarch) on Feb 20, 2007 at 16:50 UTC | |
|
Re: Whats wrong with this code.
by derby (Abbot) on Feb 20, 2007 at 16:52 UTC | |
|
Re: Whats wrong with this code.
by imp (Priest) on Feb 20, 2007 at 16:58 UTC | |
by kmullin5016 (Acolyte) on Feb 20, 2007 at 17:32 UTC | |
by imp (Priest) on Feb 20, 2007 at 17:38 UTC | |
by eric256 (Parson) on Feb 20, 2007 at 17:35 UTC | |
| |
| |
|
Re: Whats wrong with this code.
by cdarke (Prior) on Feb 20, 2007 at 16:56 UTC | |
by ikegami (Patriarch) on Feb 20, 2007 at 17:02 UTC | |
by cdarke (Prior) on Feb 20, 2007 at 17:08 UTC |