CC: | <cpan-questions [...] bestpractical.com> |
Subject: | RE : [fsck.com #12817] CGI::AJAX does not work completely with cgi.pm |
Date: | Fri, 21 Nov 2008 15:14:24 +0100 |
To: | <bug-cgi-ajax [...] rt.cpan.org> |
From: | <Denis.Gauthier [...] bit.admin.ch> |
Hi,
I hope I'm doing right now!
Best Regards
Denis
Denis Gauthier
Système spécialiste
Département des Finances
Office Fédéral de l'Informatique et de la Télécommunication OFIT
Section BZBW
Monbijoustrasse 74, 3003 Berne, Adresse postale: 3003 Bern
Tél. +41 31 325 02 96
Fax +41 31 322 87 96
denis.gauthier@bit.admin.ch
www.bit.admin.ch
Der Eisbrecher: Le mensuel des clients de l'OFIT
www.bit.admin.ch/eisbrecher
-----Message d'origine-----
De : Ruslan Zakirov via RT [mailto:cpan-questions@bestpractical.com]
Envoyé : vendredi, 21. novembre 2008 14:16
À : Gauthier Denis BIT
Objet : Re: [fsck.com #12817] CGI::AJAX does not work completely with cgi.pm
This tracker for problems with rt.cpan.org service. To report problems with modules read carefully instructions on http://rt.cpan.org.
On Thu, Nov 20, 2008 at 4:11 PM, Denis.Gauthier via RT <cpan-questions@bestpractical.com> wrote:
Show quoted text
>
>
> Thu Nov 20 08:11:00 2008: Request 12817 was acted upon.
> Transaction: Ticket created by Denis.Gauthier@bit.admin.ch
> Queue: cpan-questions
> Subject: CGI::AJAX does not work completely with cgi.pm
> Owner: Nobody
> Requestors: Denis.Gauthier@bit.admin.ch
> Status: new
> Ticket <URL: http://rt3.fsck.com//Ticket/Display.html?id=12817 >
> ----------------------------------------------------------------------
> ---
> Hello,
>
> Would You very kind to answer my question's, please.
>
> In this way ajax module work fine.
>
> use strict;
> use CGI; # or any other CGI:: form handler/decoder
> use CGI::Ajax;
>
> my $cgi = new CGI;
> my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func ); print
> $pjx->build_html( $cgi, \&Show_HTML);
>
> sub perl_func {
> my $input = shift;
> # do something with $input
> my $output = $input . " was the input!";
> return( $output );
> }
>
> sub Show_HTML {
> my $html = <<EOHTML;
> <HTML>
> <BODY>
> Enter something:
> <input type="text" name="val1" id="val1"
> onkeyup="exported_func( ['val1'], ['resultdiv'] );">
> <br>
> <div id="resultdiv"></div>
> </BODY>
> </HTML>
> EOHTML
> return $html;
> }
>
> But I'd like to use the other way from CGI as fallow:
>
> sub Show_HTML {
> print header,
> start_html(-title=>'', -script=>{-language=>'', -src=>''}),
> start_form(...),
> end_form(),
> end_html;
> }
>
> Could you me explain how it works?
> Have you got a documentation and examples?
> If it is a restriction form the Ajax module?
>
> When it's a bug, please register it.
>
> Thanks very much in advance
> Best Regards
> Denis
>
>
>
>
>
> Denis Gauthier
> Système spécialiste
> Département des Finances
> Office Fédéral de l'Informatique et de la Télécommunication OFIT
> Section BZBW Monbijoustrasse 74, 3003 Berne, Adresse postale: 3003
> Bern Tél. +41 31 325 02 96
> Fax +41 31 322 87 96
> denis.gauthier@bit.admin.ch
> www.bit.admin.ch
> Der Eisbrecher: Le mensuel des clients de l'OFIT
> www.bit.admin.ch/eisbrecher
>
>
>
--
Best regards, Ruslan.