As said in the comments above: You are confusing the languagesand client/server side.
I assume that you are doing CGI and usually have the Javascript code transmitted to the webbrowser.
Javascript is usually executed in the browser and only printed out as a text string by the Perl script.
Your scalar $js contains a text string which contains characters which form syntactically correct javascript. Perl can't execute or parse that code (you would need a javascript interpreter for that in Perl, which probably can even be found on CPAN, but this has nothing to do with what you want to do).
If your CGI script needs to transmit something to the javascript code running in the browser you should look into AJAX (google it!), which is basically: The browser sends another request to your CGI script, which will return information that will be processed by the Javascript code in the browser to update the html in some way.
In reply to Re: Invoking Jscript function without actionevent
by elmex
in thread Invoking Jscript function without actionevent
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |