That should be done like in the writeup of LTjake Re: passing variables from cgi to javascript with an additonal escaping of quotes.
--my %hash = ( opt1 => [qw/these are the options of the dynamic select box when opt1 in the first is selected/], #... ); my $js = 'var items = new Array();'. map { "items['$_'] = new Array('". join("','",map quotemeta => @{$hash{$_}}). "');" } keys %hash;
In reply to Re: Re: Re: passing variables from cgi to javascript
by fruiture
in thread passing variables from cgi to javascript
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |