Tree

Hello,

I am evaluating your tree in Firefox and Fedora 10.
Your demos are working well.

In my tests the scrollbar (which I understand should be automatic) does not appear.
However, everything else works very well.

Is there any declaration which I should be aware of ?

Below is the code I am using for testing.

Many thanks,
Nick

-------------------------------------------------------------------------------------
aTree=new dhtmlXTreeObject(“idTree”,“100%”,“100%”,0);
aTree.setImagePath(“sources/imgs/csh_winstyle/”);
aTree.enableTreeLines(true);
aTree.enableTreeImages(false);
aTree.enableHighlighting(true);

aTree.loadXML(“samples/appearance/tree.xml”);



Hello,


The problem wasn’t reproduced locally.


Please, provide the complete demo or direct link to the problematic page. Possibly the issue is caused by some special page layout.

Hi Alex,

Many thanks for the prompt answer.
It turns out that I have to explicitly define the (width, height) pair  in the HTML.

Another question:

I am using Firefox 3.0.7 on Fedora 10 and I want to use JSON to populate the tree.

I receive from the server the following info:

{“id”:“0”,“item”:[{“id”:“0”,“text”:“None”}]}

which seem to be correctly formatted.

-----------------------------------------
I try this:

    function loadFunc(loader)
    {
        //remove ‘\n\r’ - bug ???
         strResult = loader.xmlDoc.responseText.substring(0,loader.xmlDoc.responseText.length-2);

       //At this point in time I have exactly what the server sent, namely: {“id”:“0”,“item”:[{“id”:“0”,“text”:“None”}]}
         pTree.loadJSONObject(strResult);
    }

RESULT:

Error Type: Data Structure
XML reffers to non existing parent

(By the way, you might like to tell somebody to change ‘reffers’ to ‘refers’)
---------------------------------------------------
Now I replace ‘strResult’ above with its contents, as they come from the server:

    function loadFunc(loader)

    {

         pTree.loadJSONObject({“id”:“0”,“item”:[{“id”:“0”,“text”:“None”}]});
   
}

RESULT: everything works as it’s supposed to.

--------------

Any suggestions ?


Nick


Hello,


The tree can be populated from json file:


tree.loadJSON(url);


In case of loadJSONObject, you can try something as follows:





eval(‘var z=’+ strResult);


pTree.loadJSONObject(z);


>> By the way, you might like to tell somebody to change ‘reffers’ to 'refers’


Thank you for the information. We will correct this typo.