jquery FancyTreeView

ssfrank

New member
jquery FancyTreeView

שלום לכולם!

אני מנסה להעביר נתונים לFancyTreeView של jquery דרך ajax.
אבל הנתונים לא מתקבלים.. :(

לדעתי הבעיה היא, כי הנתונים מוחזרים על element d ולא ישירות.

אשמח לעזרה!

קוד:
$("#tree").fancytree({source: $.ajax({
type: "POST",
url: "/My_tree.aspx/GetTree",contentType: "application/json; charset=utf-8",dataType: "json",success: function(data) {return data.d;}})});


צד sever:
[WebMethod]public static string GetTree()
{
return" [{title: 'Node 1', key: '1'},{title: 'Folder 2', key: '2', folder: true, children: [{title: 'Node 2.1', key: '3', myOwnAttr: 'abc'},{title: 'Node 2.2', key: '4'} ]}]";
}
 
למעלה