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

  • Home
  • SEARCH
  • 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 6255201
In Process

The Archive Base Latest Questions

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

I’m a newbie in XUL & Java-Script programming. I just realized that I was

  • 0

I’m a newbie in XUL & Java-Script programming.

I just realized that I was completely in a wrong direction before merging two rows the user must choose the values which they want to merge. I want to show those values in a separate window with dropdown menulist.

I have a “type=”checkbox”” xul tree and the tree is formed using XML tree template.

  1. How can I get the values of the selected check-box of the corresponding row(Getting the text from the selected rows)the check-box is implemented using CSS.

<treecol type="checkbox" label="CheckBox" editable="true"/>

2.I have a drop down menu and I want to display the selected rows of the tree-cell values there.

How can i get the values of the select check-box tree row values and append it into the drop down menu dynamically? Please guide me friends.

This is my XUL tree code:

tree editable="true" id="myTodoListTree" flex="1" seltype="multiple"
datasources="file://C:/mercredi.xml" ref="*" querytype="xml" enableColumnDrag="true">

        <treecols>
        <treecol type="checkbox" label="CheckBox" editable="true"/>
        <treecol sortActive="true" sort="?name" id="name" label="FirstName" flex="1" persist="width ordinal hidden"  sortDirection="ascending"/>
               <splitter class="tree-splitter" />                   
            <treecol sortActive="true" sort="?lastname" id="lastname" label="LastName" flex="1" persist="width ordinal hidden" sortDirection="ascending"/>
                <splitter class="tree-splitter" />                    
            <treecol sortActive="true" sort="?gmail" id="gmail" label="Gmail" flex="1" persist="width ordinal hidden"  sortDirection="ascending"/>
                <splitter class="tree-splitter" />
        </treecols> 
 </tree>

 <row>
<label  value="FirstName"/>
<label  value="LastName"/>
<label  value="Gmail"/>

</row>
    <row>

   <menulist id="firstname">
    <menupopup >
    </menupopup>
    </menulist>

     </row>
</window>

First I tried to get the values of the selected row, it’s not working:
https://developer.mozilla.org/en/XUL/tree

function getCellChecked(tree, columnid)
{
alert('1');
  var arr = [];
  var column = tree.columns.getNamedColumn(columnid);
  for (var i = 0; i < tree.view.rowCount; i++){
    if (tree.view.getCellValue(i, column) == 'true')
      arr.push(i);
  }
  return arr;
  alert('final'+arr);

}

The css file:

treechildren::-moz-tree-checkbox(checked)
{
  list-style-image: url("chrome://global/skin/checkbox/cbox-check.gif");
}
treechildren::-moz-tree-checkbox(disabled)
{
  list-style-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif")
}

Please see the image of xul tree here:[url=http://postimage.org/image/2t1lnsczo/][img]http://s1.postimage.org/2t1lnsczo/jeudi1.jpg[/img][/url]

  • 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-24T14:19:15+00:00Added an answer on May 24, 2026 at 2:19 pm

    After 2days of banging my head with this problem, finally managed to fix the problem with the help of my friend. Few documents in the Firefox website is not quite clear to understand and no proper examples.

    Here is the solution:
    This function use to get the values of select check-box tree rows and append those values to my menu-list. The type of tree is “check-box” and it’s implemented using CSS.

    We can get the values of the tree rows by getNamedColumn Method tree.columns.getNamedColumn().

    Then use getCellValue() method to get the value(text content) of the selected row(rows).

     function merge()
        {
          var tree = document.getElementById('myTodoListTree');//Id of the tree
          for (var i = 0; i < tree.view.rowCount; i++) {
          if (tree.view.getCellValue(i, tree.columns.getColumnAt(0)) == 'true') 
    //To get the cell values of the entire row, if the check-box is selected(True)// 
    {
        alert(
        tree.view.getCellText(i, tree.columns.getNamedColumn("name"))+"\n"+
        tree.view.getCellText(i, tree.columns.getNamedColumn("lastname")));
    //Testing my output with alert message.
    
    //Appending my output to my menu-list.  
      var firstName= tree.view.getCellText(i, tree.columns.getNamedColumn("name"));
        var menu = document.getElementById("firstname");
          menu.appendItem(firstName);
    
        var lastName= tree.view.getCellText(i, tree.columns.getNamedColumn("lastname"));
        var menu = document.getElementById("laastname");
          menu.appendItem(lastName);
    
            }
          }
          return arr;  
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to count how many characters a certain string has in PHP, but

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.