Re: Generic Perl Questions
- From: "Paul Lalli" <mritty@xxxxxxxxx>
- Date: 27 Apr 2006 06:54:08 -0700
mot wrote:
Subject: Generic Perl Questions
Please put the subject of your post in the Subject of your post. Your
question is not about "Generic Perl Questions", it is about
"Interaction in CGI forms"
I am new to Perl. I understand (I think) how a form on a webpage can
be used to pass parameters to a perl program via CGI then the Perl on
the server runs to completion and puts out some html which is displayed
on the browser.
My question is if there is a way to have the browser inteact with the
perl program. Simliar to the way that <STDIN> can be used to interact
with Perl. For example the user clicks a button on the webpage, perl
executes something and sends something to the browser and waits for
another input from the user to continue with the same program.
More specifically here is what I had in mind: The user submits a form
that initiates Perl, Perl sends a message1 to the browser, the user
gives an input, Perl sends message2, the user gives another input and
Perl sends message 3,the user gives another inputs and so on.
Can Perl be used to do something like this? If not, any suggestions
how something like this might be done? Thanks.
This isn't really a Perl question, it's a CGI question. (The question
would be the same no matter what language your CGI application was
written in). And the answer is that this cannot be done with pure CGI
alone. There are other methods of interacting, however. One of the
newest buzzwords in this realm is "AJAX" (Asyncrhonys
Javascript...something...XML, I think). If you're planning on doing
this web development in Perl, you may be interested in the Perl module
CGI::Ajax, available at
http://search.cpan.org/~bct/CGI-Ajax-0.694/lib/CGI/Ajax.pm
Paul Lalli
.
- Follow-Ups:
- Re: Generic Perl Questions
- From: richard . wimberly
- Re: Generic Perl Questions
- References:
- Generic Perl Questions
- From: mot
- Generic Perl Questions
- Prev by Date: Re: problem with whitespace not splitting on split. -SOLVED - with followup
- Next by Date: Re: problem with whitespace not splitting on split. -SOLVED - with followup
- Previous by thread: Generic Perl Questions
- Next by thread: Re: Generic Perl Questions
- Index(es):