in reply to Re^2: CGI: Saving javascript variables
in thread CGI: Saving javascript variables
You'd have to explain your overall goal for me to know which of those is best for you. I'm just answering the part of the question about sending something JavaScript knows to a Perl script.
In a hidden field you could do something like these:Then on the Perl side, you'd read the folder_opts param, turn it into a Perl hash with one of the JSON modules.<input type="hidden" name="folder_opts" id="folder_opts"> <script type="text/javascript"> document.getElementById('folder_opts').value = '{"f1":' + fi_value + ',"f2":' + f2_value + '}'; </script>
|
|---|