initAjax option for this plugin

848 views
Skip to first unread message

subbarao

unread,
Jun 23, 2009, 5:51:03 AM6/23/09
to Discuss jquery.dynatree.js
Can any body give an example using initAjax option

moritz

unread,
Jul 4, 2009, 3:18:59 PM7/4/09
to Discuss jquery.dynatree.js
4.2.4 Initializing the tree structure from an Ajax response in
http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html
and the source code in http://wwwendt.de/tech/dynatree/doc/sample-lazy.html
should get you on the right track:

The web service is expected to return a JSON node list, formatted like
this:
[ { ... }, { ... }, ... ]

[{title: "Simple node", key: "1" },{title: "Lazy folder", isFolder:
true, isLazy: true, key: "2"},{title: "Lazy document", isLazy: true,
key: "3"}]

Schwedenhaus

unread,
Jul 10, 2009, 11:53:38 AM7/10/09
to Discuss jquery.dynatree.js
In your HTML-File

$("#tree").dynatree({
initAjax: {url: "/dynatree-ajax.php",
data: {key: "root", // Optional url arguments
mode: "all"
}
},


In your PHP file
echo '[{"title": "Obergeschoss"},{"title": "Untergeschoss",
"children": [{"title": "kind"}]}]';




On 4 Jul., 21:18, moritz <a5s...@gmail.com> wrote:
> 4.2.4 Initializing the tree structure from an Ajax response inhttp://wwwendt.de/tech/dynatree/doc/dynatree-doc.html
> and the source code inhttp://wwwendt.de/tech/dynatree/doc/sample-lazy.html
> should get you on the right track:
>
> The web service is expected to return a JSON node list, formatted like
> this:
> [ { ... }, { ... }, ... ]
>
> [{title: "Simple node", key: "1" },{title: "Lazy folder", isFolder:
> true, isLazy: true, key: "2"},{title: "Lazy document", isLazy: true,
> key: "3"}]
>
> On Jun 23, 2:51 am, subbarao <puvvadi...@gmail.com> wrote:
>
>
>
> > Can any body give an example using initAjax option- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

subbarao

unread,
Jul 22, 2009, 12:31:33 PM7/22/09
to Discuss jquery.dynatree.js
Thanks for u help. can any body help how initially tree should be
expand.
Reply all
Reply to author
Forward
0 new messages