I am have created a selectable JQuery Dynatree object, and now what I want are two things:

  1. pass the Dynatree selection result into JSON and pass to another tree as a preview.
  2. post the JSON format data from the form to call related web services.

Any advice will be appreciated. thanks.

有帮助吗?

解决方案

You can easily see from the documentation (and in the samples page) that you can get all selected nodes by using getSelectedNodes as:

$("#tree").dynatree("getSelectedNodes")

This will get you an array of all selected nodes, which you can pass to your JSON object without tampering with this, as JSON access arrays.

To use a preview, you can check the Drag'n'drop 3 sample.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top