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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:13:20+00:00 2026-06-19T00:13:20+00:00

this is the extjs 4 pass the parameter groupid var store = Ext.create(‘Ext.data.TreeStore’, {

  • 0

this is the extjs 4 pass the parameter groupid

var store = Ext.create('Ext.data.TreeStore', {
        proxy: {
    type: 'ajax',
    autoLoad: true,
    url: 'tree1.php',
    extraParams :{groupid:'2'},
    // Here Magic comes
    },
    actionMethods: 'GET',
        sorters: [{
            property: 'leaf',
            direction: 'ASC'
                    }, {
            property: 'text',
            direction: 'ASC'
                    }]
    });

tree1.php

<?php
mysql_connect("localhost", "root", "") or die("Could not connect");
mysql_select_db("db_gps") or die("Could not select database");


$parent_id = $_GET['node'];
$group_id = $_GET['groupid'];

if ($parent_id > 0){

}else{
$parent_id = "0";   
}
    // 1) Remove false as checked
    if ($group_id > 0){
    $query = "SELECT * FROM (SELECT GroupID as id,GroupName as text,0 as parent_id FROM tbl_group UNION SELECT DeviceID as id,VehicleNo as text,GroupID as parent_id FROM Tbl_device) as u WHERE parent_id = '".$parent_id."' AND id= '".$group_id."' ORDER BY u.text ASC"; 
    }else{
    $query = "SELECT * FROM (SELECT GroupID as id,GroupName as text,0 as parent_id FROM tbl_group UNION SELECT DeviceID as id,VehicleNo as text,GroupID as parent_id FROM Tbl_device) as u WHERE parent_id = '".$parent_id."' ORDER BY u.text ASC"; 
    }


    $rs = mysql_query($query);
    $arr = array();
    while($obj = mysql_fetch_object($rs)) {

        $qq = mysql_query("SELECT * FROM tbl_device WHERE GroupID='". $obj->id ."'");

        if (mysql_num_rows($qq) > 0) {
            // if have a child
            //echo "have child";
            $obj->leaf = "false";
            //$obj->cls = 'folder';
        } else {
            // if have no child

            $obj->leaf = "true";
            //$obj->cls = 'file';
        }

      // 2) If no leaf then destroy the attribute
      if($obj->leaf != "false"){
         // 1) set checked attribute with an boolean value 
         $obj->checked = false;       
      }
     $arr[] = $obj;
    }   

//echo $parent_id;  
echo json_encode($arr);
?>

FireBug Screenshot

enter image description here

Question

when i use FireBug to get the params, don’t have any groupid param.why? i totally no idea what wrong is this.
please help thanks you very much !

  • 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-06-19T00:13:21+00:00Added an answer on June 19, 2026 at 12:13 am

    looks ok, butextraParams :{'groupid':'2'},–> string

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

Sidebar

Related Questions

I have this extjs container var cont = Ext.create('Ext.container.Container',{ cls: 'myClass1', id: myId, flex:
I found this extjs script that create a empty gridpanel: var gridz = new
I'm using this ExtJS REST proxy to get and post data to my REST
I have a Extjs data store in home page and im getting data from
The Sencha ExtJS framework Ext.grid.Panel component is great for representing result set data. However,
this is extjs javascript code Ext.require([ //'Ext.form.*', //'Ext.layout.container.Column', //'Ext.tab.Panel' '*' ]); Ext.onReady(function() { Ext.QuickTips.init();
Is it possible to do this process in ExtJS 4.1.x ? var myMixedCollection =
When I sync for edited grid, extjs pass JSON data to Server by AJAX.
I am working through this extJS tutorial where you type in code into Firebug,
I created this simple tree: var children = [{ text:'My Layers', children:[ new Ext.tree.TreeNode({text:'test1',leaf:true}),

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.