Andy,
I think the best way to accomplish what you're trying to do is to
use AJAX. AJAX allows you to use JavaScript to issue an HTTP POST
or GET without reloading the page. There's a perl module that makes
this (relatively) easy to do at http://search.cpan.org/~bct/CGI-Ajax-
0.701/lib/CGI/Ajax.pm. The module includes several examples to get
you started. If you're trying to anything very complicated, you'll
need to read up on HTML, CGI, Javascript, and (less critically) XML.
I'd recommend three books from O'Reilly and Associates (www.ora.com):
* Programming Perl
* JavaScript: the Definitive Guide 5th edition or later
* CGI Programming with Perl
The JavaScript book contains a whole chapter about AJAX that I found
quite helpful.
AJAX introduces significant additional complexity to your project --
particularly if you haven't dealt with JavaScript much before. It
might be easier to rethink the way your application works and decide
if four independent forms on one page is worth the effort.
Darren
--- In Perl_Official@yahoogroups.com, "Andy Schafer"
<lostgameparts@...> wrote:
>
> Hi,
>
> I'm pretty new to Perl and need some help!
>
> I am working on a project that requires 4 forms on the same page. I
> would like to be able to submit each one separately but if the user
> has entered information in any of the other 3, that information
will
> be lost. (I think, and please correct me if I'm wrong!)
>
> What I'm wondering is this: Is there a way to submit a form to the
CGI
> script without actually leaving the page the form is on?
>
> I thought about using iFrames for each form but really don't like
that
> idea. I could also use one submit button for all 4 forms but I
don't
> like that either.
>
> I've hunted through all my books and on the net with no luck. I
know
> I'm probably overlooking something simple but I can't for the life
of
> me find it!
>
> If any of you can help me I would really appreciate it!
>
> Thank you very much!
> Andy
>