Perl

Moderators: Jonathan
Number of threads: 1236
Number of posts: 3605

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
cgi-perl Posted by JATA01 on 15 Dec 2008 at 12:28 AM
Hello Friends,

I have written a cgi-bin/perl script.
I need some help to complete this task.

I have 3 pop up ment and My scenario is like:

1st pop up: 1 2 3
2nd pop up: A B C
3rd pop up: ls cd ps

When we will select 1 then the A ans ls should be selected automatically and 2 B cd....

How can we do this?

Your input is highly helpful for me!!

Report
Re: cgi-perl Posted by JATA01 on 15 Dec 2008 at 8:12 PM
: Hello Friends,
:
: I have written a cgi-bin/perl script.
: I need some help to complete this task.
:
: I have 3 pop up ment and My scenario is like:
:
: 1st pop up: 1 2 3
: 2nd pop up: A B C
: 3rd pop up: ls cd ps
:
: When we will select 1 then the A ans ls should be selected
: automatically and 2 B cd....
:
: How can we do this?
:
: Your input is highly helpful for me!!
:
:


Ok, so no one replied????

Report
Re: cgi-perl Posted by leeb003 on 10 Jan 2009 at 5:10 PM
Since you've already written some of it, you might want to post what you have so people can look at what you are doing. It sounds to me like you are trying to pass variables to 3 different forms. If you are doing that, you can use hidden variables in your cgi to pass them along:

<INPUT TYPE="hidden" NAME="selection" VALUE="$selection">

and use variables to store the form data:

my $selection = param('selection');

if ($selection ne "") {
take them to step 2
}

If you just want one form to change 2 other variables that's different.
if ($selection =~ /1/) {
$pop2 = "A";
$pop3 = "ls";
}
if ($selection =~ /2/) {
$pop2 = "B";
$pop3 = "cd";
}

Report
Re: cgi-perl Posted by JATA01 on 11 Jan 2009 at 9:29 PM
#!/usr/bin/perl

use CGI;
# File: time1.pl
use CGI ':standard';
$current_time = localtime;
#
print header,
start_html('A Virtual Clock'),
h1('A Virtual Clock'),
"The current time is $current_time.",
hr,
end_html;

$base_address = '/www/jshankar/search';
$base_url = 'http://xyz.com/~abc/search';

$co = new CGI;

if ($co->param()) {

$BuildExecute = $co->param('BuildExecute');
}

print $co->header,

$co->start_html
(
-title=>'CGI Example',
-author=>'Shankar',
-meta=>{'keywords'=>'CGI Perl'},
-BGCOLOR=>'pink',
-LINK=>'green'
),

$co->center
(
$co->h1
(
'Welcome CGI-BIN Script!'
)
),

$co->center
(
$co->h2
(
'IGT Script'
)
),

"Please enter your password: ",

$co->p,
$co->password_field

(
-name=>'password',
-default=>'open sesame',
-size=>30,

),

"you might be interested in ",

$co->a({href=>"http://www.cpan.org/"},"CPAN"), ".",

$co->hr,

$co->start_form
(
-name=>'form1',
-method=>'POST',
-action=>"http://IP/manual/mod/core.html#documentroot"
),

"Please check the script you want to execute: ",

$co->p,

$co->center
(
$co->checkbox_group
(
-name=>'checkboxes',
-values=>['Products','Build File','Go']
)
),

$co->p,

$co->hidden
(
-name=>'BuildExecute',
-override => 1,
-default => $BuildExecute
),

$co->p,

$co->center
(
$co->submit('Add to Build Execute'),
$co->reset,
),

$co->p,

$co->hr,

$co->end_form,

$co->start_form
(
-name=>'form2',
-method=>'POST',
-action=>"http://xyz.com:8080/navbar/"
),

$co->hidden
(
-name=>'BuildExecute',
-override => 1,
-default => $BuildExecute
),

$co->center
(
$co->submit('Go to Build Script Location'),
),

$co->end_form,

$co->start_form
(
-name=>'form3',
-method=>'POST',
-action=>"http://www.iciciprulife.com/public/default.htm"
),

$co->hidden
(
-name=>'BuildExecute',
-override => 1,
-default => $BuildExecute
),

$co->center
(
$co->submit('See Your Build Status'),
),

$co->p,

"Please select the numbers: ",

$co->p,

$co->popup_menu
(
-name=>'popupmenu',
-value=>['Blank','1','2','3','4'],
'Blank',
),

$co->p,

"Please select the Alphabets: ",

$co->p,

$co->popup_menu
(
-name=>'popupmenu',
-value=>['Blank','A','B','C','D'],
'Blank',
),

$co->p,

"Please select the command: ",

$co->p,

$co->popup_menu
(
-name=>'popupmenu',
-value=>['Blank','ls','mkdir','cat','cd'],
'Blank',
),

$co->p,

"Please select the dir path: ",

$co->p,

$co->popup_menu
(
-name=>'popupmenu',
-value=>['Blank','/home/test','/home/test/newdir'],
'Blank',
),

$co->p,
(
$co->submit('Submit'),
$co->reset,
),

$co->p,

"Please enter your opinion: ",

$co->p,

$co->textarea
(
-name=>'textarea',
-default=>'No opinion',
-rows=>10,
-columns=>60
),

$co->p,

"Thank you for submitting Build. Please indicate how
much unsolicited mail you like to get: ",

$co->p,

$co->popup_menu
(
-name=>'popupmenu',
-values=>['Very much','A lot','Not so much','None'],
),

$co->p,

$co->hidden
(
-name=>'hiddendata',
-default=>'Rosebud'
),

$co->p,
(
$co->submit('Submit'),
$co->reset,
),

$co->start_html("Check if someone is logged in"),

$co->center
(
$co->h1("Check if someone is logged in...")
),

$co->p,
$co->start_form,

$co->center
(
"Please enter the person's login name: ",

$co->textfield('person'),

$co->p,
$co->submit('Check'),
$co->reset
),
$co->end_form;

if ($person = $co->param('person')) {

foreach (`who`) {

if (/^$person\s/) {

print
$co->center
(
$co->h2
(
"Yes, $person is logged in.",
)
),
$co->end_html;

exit;
}
}

print
$co->center
(
$co->h2
(
"$person is not logged in, sorry.",
)
);
}

$co->end_form,

$co->end_html;
___________________________________

Above are the codes I have written, It's my first script, so I don't have much knowledge, how to process?
Using this script I want to execute the the script which is on the other system.

Kindly help me to resolve the issue.

Thanks -


Report
Re: cgi-perl Posted by JATA01 on 16 Jan 2009 at 3:18 AM
I am in urgent need to finish it.
please help me to complete this task.

I will be so kind of you.

Thanks-
Report
Re: cgi-perl Posted by JATA01 on 20 Jan 2009 at 9:57 PM
Hello Friends,

I urgent need to finish this task.
Kindly help me.

I will be thankful to you.

Thanks-

Report
Re: cgi-perl Posted by JATA01 on 20 Jan 2009 at 9:57 PM
Hello Friends,

I urgent need to finish this task.
Kindly help me.

I will be thankful to you.

Thanks-

Report
Re: cgi-perl Posted by leeb003 on 20 Jan 2009 at 10:39 PM
Check your forum mailbox.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.