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 6357963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:16:35+00:00 2026-05-24T23:16:35+00:00

I have a function to get the values of the selected check-box from the

  • 0

I have a function to get the values of the selected check-box from the xul file(Lets say tree.xul). In another XUL file has the text-box where I want to pass the values(label values) of the selected check-box(Lets say textbox.xul).

Originally I’m opening my “tree.xul” file from “textbox.xul” file. When I select the check box values and click on the button to pass the values to an another xul file(“textbox.xul”).

I have a text-box in “textbox.xul” file, I want to pass the values of the check-box to this text-box.

 <textbox id="ali" value=""/>
 <button label="Contacts" onclick="DisplayContacts();"/>

In my script I’m trying like this but it’s not working and also I have included this small piece of code function

window.close();

to close the window(“tree.xul”) after passing the values.

Do i have to use an array to store all the values of the variable?

I’m trying using the explanation from Mozilla dialog but it’s not working.

 function get() { // check the alignment on a number of cells in a table.
var table = document.getElementById("box");
var cells = table.getElementsByTagName("checkbox");
for (var i = 0; i < cells.length; i++)
{
     var cell = cells[i];
        if(cell.checked) {
            alert(cell.getAttribute("label"));
            var x = cell.getAttribute("label");
            x  = window.arguments[0];
            // or cell.label
        }
 }

  window.close();

}

This is the code for the check-box values created dynamically:

function choose()
{
//alert('hi');
  var tree = document.getElementById('myTodoListTree');
  for (var i = 0; i < tree.view.rowCount; i++) {
   if (tree.view.getCellValue(i, tree.columns.getColumnAt(0)) == 'true'){


var empty = " ";
var contact = (tree.view.getCellText(i, tree.columns.getNamedColumn("name"))+ empty+
tree.view.getCellText(i, tree.columns.getNamedColumn("lastname"))+ empty+ "Contacts:");

var ggmail = tree.view.getCellText(i, tree.columns.getNamedColumn("gmail"));
var yyahoo = tree.view.getCellText(i, tree.columns.getNamedColumn("yahoo"));


  var existingEl  = document.getElementById('box');
  var capt   = document.createElement('groupbox');
  existingEl.appendChild(capt);
  var captionEl   = document.createElement('caption');
  capt.appendChild(captionEl);
  captionEl.setAttribute('label', contact );
  captionEl.setAttribute('style', 'color: blue;');


  var existing  = document.getElementById('box');
  var checkbox   = document.createElement('checkbox');
  capt.appendChild(checkbox);
  checkbox.setAttribute('label', ggmail );
  checkbox.setAttribute('style', 'color: green;');

  var existing  = document.getElementById('box');
  var checkbox   = document.createElement('checkbox');
  capt.appendChild(checkbox);
  checkbox.setAttribute('label', yyahoo);
  checkbox.setAttribute('style', 'color: green;');

    }
  }
  return arr;

} 

Here the user select the check-box in the “tree.xul” file and I have button(“function get()”) to add the values to the text-box in the “texbox.xul” window.

This is the function to open the tree.xul from the text-box.xul file:

function DisplayContacts()
{
var returnValues = { out: null };
window.openDialog("chrome://hello/content/sundayevening2.xul","sundayevening2","", returnValues);
}

Please help me to pass the values to the text-box in another XUL window.

Thanking you.

  • 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-24T23:16:35+00:00Added an answer on May 24, 2026 at 11:16 pm

    You may want to use something like this: Passing extra parameters to the dialog in XUL

    This provides a simple way to pass values across xul files.

    For your problem you can do something like this in the textbox.xul. This will open tree.xul along with the extra parameter returnValues:

    var returnValues = { out: null };
    window.openDialog("tree.xul", "tree", "modal", returnValues);
    

    Note modal is a must.

    Next in your tree.xul, store all the values (lets call it x) that you want to pass to textbox.xul as below:

    window.arguments[0].out = x
    

    Note window.argument[0] refers to returnValues

    Now you can access the values of x (which is the names of the labels in your case) in textbox.xul as follows:

    var labels = returnValues.out;
    

    Basically,

    1. You pass a parameter to the child window at the time of opening it.

    2. Then in the child window, fill the parameter with the values that wish to pass back to
      the parent window and then close the child window.

    3. Now back in the parent window you can access the parameter that you passed to the child and it contains information updated by the child window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a via with some jQuery function to get value from HTML element
Am trying to pass the selected check box value to the control function. Please
I have created a Check box JQuery Plugin, but when i want to get
I have a form submit, where it get the values from the form and
i have a function to calculate several different values: int ASPfile::get_dimensions(int* Lat, int* Lon,
I have a function where I get a list of ids, and I need
I have the following function: //Function to get random number public static int RandomNumber(int
I have a javascript/jQuery block as a callback after $.get function: function myCallBack(data, textStatus)
I have a function that takes variadic arguments, that I obtain from func_get_args() .
I'm trying to get rid of floats in my functions. I have one function

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.