in reply to How do you pass a perl variable to a Javascript function
Once all this is done, the webpage is generated and sent off to the client (the user's browser). At that point it is any normal webpage, and as far as the user is concerned, anything or any language could have created it. Now, the Javascript works as in any other page.
You can do the reverse and have Js "communicate" with Perl -- use Js to populate form or url variables to send them back to the server so Perl can now use it to do other things.
If you are using the above concept and it is not working, perhaps it would help to post any error messages you might have in the error log. Perhaps the Perl script is breaking elsewhere and not even generating the value that you are expecting in your webpage.
|
|---|