One way: create a hidden field in the form and put in the folder.style information. If you have a lot of fields, send it as a JSON string. Then on the server side, use JSON or JSON::Syck to turn that string into a Perl data structure and voila - your JS variables are in your CGI script.