Tree disappears when dhtmlXTreeFromHTML() is called

I am following the instructions at docs.dhtmlx.com/doku.php?id=dhtm … _from_html

When I paste the example code for HTML initialization into my own page, the tree is visible for a fraction of a second and then disappears. If I remove the call to dhtmlXTreeFromHTML(), the tree stays visible and appears fully functional. But then I don’t have script access to it.

I get the same error in both Chrome 15.0.874.120 and Firefox 7.0.1.

What am I missing?

Here is my code (90% of which is copied from the docs):

[code]

<div class="dhtmlxTree" // for automatic conversion
    id="treeboxbox_tree"
    setImagePath="/static/dhtmlxTree/codebase/imgs/"
    style="width:250px; height:218px;overflow:auto;">
    <ul>
        <li>Root
            <ul>
                <li>Child1
            <ul>
                <li>Child 1-1</li>
                </ul>
                <li>Child2</li>
                <li><b>Bold</b> <i>Italic</i></li>
            </ul>
        </li>
    </ul>
</div>
<script>
    // If I comment out the line below, the tree will be visible, otherwise not.
    var myTree = dhtmlXTreeFromHTML("treeboxbox_tree"); // for script conversion
</script>
[/code]

You are mixing 2 type of initialization - automatic initialization and initialization with script. You should choose which one you should use

OK, please help me understand. In the docs, at docs.dhtmlx.com/doku.php?id=dhtm … _from_html, there is a gray box of code that says:

[code]


<div class="dhtmlxTree" // for automatic conversion
    id="treeboxbox_tree"
    setImagePath="[full path to this category]/imgs/"
    style="width:250px; height:218px;overflow:auto;">
    <ul>
        <li>Root
            <ul>
                <li>Child1
            <ul>
                <li>Child 1-1</li>
                </ul>
                <li>Child2</li>
                <li><b>Bold</b> <i>Italic</i></li>
            </ul>
        </li>
    </ul>
</div>
<script>
    var myTree = dhtmlXTreeFromHTML("treeboxbox_tree"); // for script conversion
</script>

[/code]

I can’t simply replace the “[full path …]” parts with a path and run this example code? What do I need to do to load the HTML and have a Javascript variable pointing to the tree object?

Best Regards

Martin