[SOLVED] Submit Button is not Recognizable | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

[SOLVED] Submit Button is not Recognizable

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-06-2012
gkrish gkrish is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 6 December 2012, 8:24 AM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
[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
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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



All times are GMT -4. The time now is 05:39 PM.