Adding data to jqxtree dynimacally on click of nodes of a tree using AJAX call

In this blog we are explaining how to adding data to jqxtree dynimacally on click of nodes of a tree using AJAX call. We have explained with complete code and steps.

jqtree-jquery-tree-plugin

There might be a case where user wants to add data to jqxtree on click of each individual node. Below is the code which help us to achieve the above functionality where user can get data from JSON file or database on click of each individual tree node , depending whether parent have child nodes or not. Check below code.

  1. <script type=“text/javascript”>
  2. $(document).ready(function () {
  3. var theme = “”;
  4. // Create jqxTree
  5. var tree = $(‘#topictree’);
  6. var source = null;
  7. $.ajax({
  8. async: false,
  9. url: “topic.php”,
  10. success: function (data, status, xhr) {
  11. source = jQuery.parseJSON(data);
  12. }
  13. });
  14. tree.jqxTree({ source: source, theme: theme, height: 600, width: 400 });
  15. …..

Read full blog at- Adding data to jqxtree dynimacally on click of nodes of a tree using AJAX call . You can check more informative blogs and tutorials at android development blogs section and can also browse the android developer forum for posting and viewing latest questions on android development.

Advertisements
Adding data to jqxtree dynimacally on click of nodes of a tree using AJAX call

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s