anbutechie has asked for the wisdom of the Perl Monks concerning the following question:
I m using CGI module to create a web page and i m using java script to get the element which is selected. I m able to store the selected value in javascript variable. I need to store the value in perl variable.
sample code
use CGI qw/:standard/;
$JSCRIPT=<<eof;
function testing()
{
var v=document.getElementById('product').value;
}
eof
print header(),
start_html(-title=>'Wow!',-script=> $JSCRIPT),
start_form,
"PRODUCT", popup_menu(-name=>'Product',-id=>'Product',-value=>'1','2', -multiple=>'true',-size=>5,-onChange=>"testing();"),
end_form,
end_html();
I need to get the value stored in javascript variable (var) to perl variable.
Regards,
Anbarasu
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to store the value of javascript variable to perl variable
by almut (Canon) on Apr 22, 2009 at 16:02 UTC | |
|
Re: how to store the value of javascript variable to perl variable
by mr_mischief (Monsignor) on Apr 22, 2009 at 15:58 UTC | |
|
Re: how to store the value of javascript variable to perl variable
by roboticus (Chancellor) on Apr 22, 2009 at 19:24 UTC |