in reply to Re: Re: passing variables from cgi to javascript
in thread passing variables from cgi to javascript
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;
|
|---|