title: Using jstree checkboxes in forms
body: <p>Sorry for the slightly ambiguous title. My problem is very specific (and it's probably just me being a newb), I just didn't know how to explain it in the title.</p>
  
  <p>I'm currently upgrading a webpage. This webpage has 3 lists with items in them, for example the Devices list has different types of cars. Each item has a checkbox, the user checks the ones he wants to use, and then presses a button. Then he receives a report based on his selections.</p>
  
  <pre><code>&lt;input type="button" class="mapbutton"  onclick="company.view.reports.serialize(this);" 
                  style="width:280px;font-size:1em" 
                  value="&lt;fmt:message key="owner.text.open_report" /&gt;" /&gt;
  </code></pre>
  
  <p>This is the code for the button.</p>
  
  <pre><code>serialize: function(what){
                var m = company.model.report;
                var strDev = 'devices=';
                var devicesCB = $(".devicesCB:checked");
                if (devicesCB.length &gt; 0){
                    for (var i=0;i&lt;devicesCB.length;i++) {
                       strDev += devicesCB[i].value + ',';
                    }
                    strDev = strDev.substring(0, strDev.length - 1);
                }
  </code></pre>
  
  <p>and this is part of the serialize function that is fired when the user presses the button. The <code>$(".devicesCB:checked")</code> part is jQuery, and returns all the checked checkboxes of the class <code>"devicesCB"</code>. This line is also the key to my question.</p>
  
  <pre><code>checkbox : {
          "real_checkboxes" : "true",
          "override_ui" : "true",
          "real_checkboxes_names" : function(n){
              console.log("As");
              return[("area"+n[0].id),n[0].id];
          }
      },
  </code></pre>
  
  <p>According to the jstree documentation, this should create checkboxes that work in forms. Any ideas how I would go about retrieving this data? I have tried var <code>cb = $(".jstree-checkbox:checked")</code> which didn't really do anything, also I tried working with the tree's selector <code>var areasCB = $("#tree");</code> but I couldn't figure out what to do with it.</p>
  
  <p>I'm pretty sure this is a fairly simple problem, but I'm still very new to jQuery and javascript in general.</p>