|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[SOLVED] Submit Button is not Recognizable
Hi ... I am writing a PERL CGI script where firstly i display a Submit button and when i click that, it will display a group of checkbox values and another submit button. My question is Now, if i click the second submit button, it should get the checkbox values and work with those(do some calculations) ... But its not happening ... when i click second submit button nothing happens ... it just stays calm .... Here is the Sample Code ... Code:
#!/usr/local/bin/perl5
print "Content-type: text/html; charset=iso-8859-1\n\n";
use strict;
use warnings;
use CGI;
my $cgi = CGI->new;
print $cgi->start_html('-title' => 'Example', -author => 'Krishna Chaitanya G', -bgcolor => 'grey');
print $cgi->start_form(), "\n";
print $cgi->submit( '-name' => 'button1', '-value' => 'Search' );
print $cgi->end_form();
if ( $cgi->param('button1') )
{
print $cgi->checkbox_group(-name=>'open_mods',-values=>[1,2,3,4,5],-multiple=>'true',-columns=>8,-rows=>12);
print $cgi->submit( '-name' => 'button2', '-value' => 'Close' );
}
if ( $cgi->param('button2') )
{
print $cgi->param('open_mods');
}
print $cgi->end_html();As per my above idea ... if i click second submit button the output in browser should print the selected checkbox values ... But, now its nothing Please Help .... ---------- Post updated at 06:31 PM ---------- Previous update was at 04:09 PM ---------- got it working ... Had to change the end_form() placement ... Last edited by gkrish; 12-06-2012 at 06:01 AM.. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Validation of Text field while Click on submit button | Navrattan Bansa | Shell Programming and Scripting | 0 | 01-27-2012 05:20 AM |
| include virtual perl-script - submit button opens a new page.. | tip78 | Web Programming | 3 | 08-19-2010 12:02 PM |
| include virtual perl-script - submit button opens a new page.. | tip78 | Shell Programming and Scripting | 0 | 08-18-2010 09:23 AM |
| Changing middle mouse button for pasting to right mouse button in cygwin rxvt | sayeo | UNIX for Dummies Questions & Answers | 2 | 03-14-2008 09:55 PM |
| Script for using the Back button and the Close button | mdgibson | UNIX for Dummies Questions & Answers | 1 | 09-27-2005 09:18 AM |
|
|