Hi ,

 I got a cgi in perl, in this cgi i use ajax to ejecute a javascript code,
in this code i produce a prompt, and i store the value at the res variable.

now i would like to store this variabe, res into a perl variable ($res),
something like $res=res

How can i do that?

thanks

#!/usr/bin/perl

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 );

my $script=&Show_HTML;

print $pjx->build_html( $cgi, $script);

sub Show_HTML {
my $html .= <<EOHTML;
<HTML>

<script type="text/javascript">


function valor(){
var res;
res=prompt("introduir nom","");
}
</script>
<BODY onload=valor();>
</BODY>
</HTML>
EOHTML
        return $html;
};

-- 
Pau Marc Muñoz Torres

Laboratori de Biologia Computacional
Institut de  Biotecnologia   i Biomedicina Vicent
Villar
Universitat Autonoma de Barcelona
E-08193 Bellaterra (Barcelona)

telèfon: 93 5812807
Email : [EMAIL PROTECTED]

Reply via email to