EasyUI Forum
April 27, 2024, 03:23:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: combotree :'loadData' and 'reload' functions do not work  (Read 17128 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: January 30, 2013, 06:17:39 AM »

Can anybody try 'loadData' and 'reload' functions for combotree?

When I create combotree with url like this I have no problem

Code:
$('mycc').combotree({
    url:'getData.php?id=1';
})

but when I try to update it with new url/data it fails with the following message in Firefox:

TypeError: $.data(...) is undefined        jquery.eas....js:10630

This problem is valid for the following code:

Code:
$.post('getData.php?id=1'),
    function(data){
        $('mycc').combotree('loadData',jQuery.parseJSON(data));
    }
);


TypeError: $.data(...) is undefined        jquery.eas....js:10637

This problem is valid for the following code:

Code:
$('mycc').combotree('reload','getData.php?id=1');
« Last Edit: January 30, 2013, 06:22:58 AM by mzeddd » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 30, 2013, 11:57:05 PM »

Please refer to http://jsfiddle.net/kwV9G/. It seems the 'loadData' method works fine.
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: January 31, 2013, 01:55:24 AM »

In this example you are not using data from outside. In my case I'm getting data string from getData.php script.
Possible jQuery.parseJSON(data) do not convert string to tree object properly.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!