Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8564351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:10:50+00:00 2026-06-11T17:10:50+00:00

I have a full tree with multiple items and multiple levels, the tree is

  • 0

I have a full tree with multiple items and multiple levels, the tree is build with an ajax call and uses lazy nodes

So now i want to add the function so my tree can load and select and item if i give the full path, but before i can select the item i need to make sure that the item is loaded with lazy loading so i can access it.

I found the function .loadKeypath(), so for testing i retrieved the full path to my node with

node.getKeyPath();

so the path is /12/16/17/18

So i figured out i should put this code after the ajax data was loaded in

onPostInit: function(isReloading, isError){
                $("#tree").dynatree("getTree").loadKeyPath("/12/16/17/18", function(node, status){
                    if(status == "loaded") {
                        // 'node' is a parent that was just traversed.
                        // If we call expand() here, then all nodes will be expanded
                        // as we go
                        node.expand();
                    }else if(status == "ok") {
                        // 'node' is the end node of our path.
                        // If we call activate() or makeVisible() here, then the
                        // whole branch will be exoanded now
                        node.activate();
                    }else if(status == "notfound") {
                        var seg = arguments[2],
                            isEndNode = arguments[3];
                    }
                });
            }

But now i get this warning in the console:

Node not found: 12 jquery.dynatree.js:49

Adn this is the full log

9:12:27.862 - Dynatree._create(): version='$Version: 1.2.0$', debugLevel=2. jquery.dynatree.js:52
9:12:27.865 - DynaTree.persistence: 
Object
 jquery.dynatree.js:52
9:12:27.867 - Dynatree._load(): read tree structure... jquery.dynatree.js:52
9:12:27.868 - Dynatree._init(): send Ajax request... jquery.dynatree.js:52
9:12:27.869 - Class.create.removeChildren(false) jquery.dynatree.js:52
9:12:27.876 - Dynatree._load(): render nodes... jquery.dynatree.js:52
9:12:27.877 - Dynatree._load(): bind events... jquery.dynatree.js:52
9:12:27.885 - Dynatree._load(): postInit... jquery.dynatree.js:52
9:12:27.887 - Dynatree._init(): done. jquery.dynatree.js:52
9:12:27.889 - ui.dynatree._init() was called; no current default functionality. jquery.dynatree.js:52
9:12:29.483 - Removed leading root key. jquery.dynatree.js:52
9:12:29.484 - Class.create._loadKeyPath(12/16/17/18) jquery.dynatree.js:52
9:12:29.484 - Node not found: 12 jquery.dynatree.js:49
9:12:29.485 - trigger nodeLoaded.dynatree.tree._1 jquery.dynatree.js:52
9:12:29.485 - dtnode._expand(true) IGNORED - 
Class.create
 jquery.dynatree.js:52

So how can i load a node what tis nested in other nodes

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:10:51+00:00Added an answer on June 11, 2026 at 5:10 pm

    This is an answer for future reference

    After some debugging and help from the dynatree developers, we came up with a solution, if you want to load up a key path use an string as key and not an integer.

    instead of

     "icon": false,
            "checkbox": false,
            "title": "xxxxxxxx",
            "key": 23,
            "type": "child"
    

    use

     "icon": false,
            "checkbox": false,
            "title": "xxxxxxxx",
            "key": "23",
            "type": "child"
    

    That way the loadkeypath function will pickup the correct path!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this function to return the full directory tree : function getDirectory( $path
I'm new to visual studio, coming from Delphi. I have a directory tree full
I really want to have full control of section headers by laying out in
I have got an array full with items like these: array( array( 'id' =>
I'm attempting to build a tree, where each node can have an unspecified amount
I have PDF papers copied/pasted into TXT as input and I want to build
I have a pretty complex dom-tree with various exceptions etc. So I don't want
I have a Flex tree control that holds a tree full of various types
I have full weekly backups, daily differential backups and hourly transaction log backups. To
In my live site I have php include() and require() that have full path

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.