Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6327651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:19:04+00:00 2026-05-24T17:19:04+00:00

Sorry for the slightly ambiguous title. My problem is very specific (and it’s probably

  • 0

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.

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.

<input type="button" class="mapbutton"  onclick="company.view.reports.serialize(this);" 
                style="width:280px;font-size:1em" 
                value="<fmt:message key="owner.text.open_report" />" />

This is the code for the button.

serialize: function(what){
              var m = company.model.report;
              var strDev = 'devices=';
              var devicesCB = $(".devicesCB:checked");
              if (devicesCB.length > 0){
                  for (var i=0;i<devicesCB.length;i++) {
                     strDev += devicesCB[i].value + ',';
                  }
                  strDev = strDev.substring(0, strDev.length - 1);
              }

and this is part of the serialize function that is fired when the user presses the button. The $(".devicesCB:checked") part is jQuery, and returns all the checked checkboxes of the class "devicesCB". This line is also the key to my question.

checkbox : {
        "real_checkboxes" : "true",
        "override_ui" : "true",
        "real_checkboxes_names" : function(n){
            console.log("As");
            return[("area"+n[0].id),n[0].id];
        }
    },

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 cb = $(".jstree-checkbox:checked") which didn’t really do anything, also I tried working with the tree’s selector var areasCB = $("#tree"); but I couldn’t figure out what to do with it.

I’m pretty sure this is a fairly simple problem, but I’m still very new to jQuery and javascript in general.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:19:05+00:00Added an answer on May 24, 2026 at 5:19 pm

    Here is one way of getting the checked nodes:

    $("#my_tree").jstree("get_checked", null, false).each(function() {
        //do something
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the vague title, I didn't know how else to phrase this. Suppose
Well, sorry about the confusing title but I'm having a slightly annoying problem with
Sorry for the slightly rubbish title. I could not think how to describe this
Sorry for the slightly noobish question, as I am writing my first rails app.
Sorry for this not being a real question, but Sometime back i remember seeing
Sorry the title isn't more help. I have a database of media-file URLs that
Sorry if the title is poorly descriptive, but I can't do better right now
Sorry I couldn't come up with a better title. Here is my htaccess RewriteEngine
Sorry about the title - I couldn't figure out a way to phrase it.
Sorry about the title but could not come up with anything really informative and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.