in reply to how to store the value of javascript variable to perl variable

To get the value in the Perl code on the server from the JavaScript code on the client, you'll have to initiate communication from the client back to the server. You can do this by submitting a form or by using XMLHTTPRequest from JavaScript in the client. There's a broad and deep topic called "AJAX" that covers the latter.

You can find tools to help you with AJAX, like Prototype, Scriptaculous, or jQuery. There are also Perl modules that help with AJAX, among them CGI::AJAX, HTML::Prototype::JS, and JQuery.

  • Comment on Re: how to store the value of javascript variable to perl variable