Topic: Newbie

Hi there!

I have been pointed to this js framework as I need a sortable nested list solution.

I have downloaded the tree builder files v1.2.6.1-packed.js, linked in my code and without actually doing anything else I get the error

--- Line:1 Error Expected ; ---

Have a downloaded the wrong file in error?

Many thanks

Last edited by Shannow (2010-05-13 17:48:39)

Re: Newbie

I have donwloaded the uncompressed version and that works ok!

Re: Newbie

Hi there,

I am really struggling to get something to show up, is there a basic tutorial to show me the basics of this framework?

I am looking through the demos and docs and just trying to get a very basic tree to show up.  This is my code so far but is giving me errors with mootools;

function jsonTry2() {
    var testTree = new Mif.Tree(
        { types: {
            nodeType: {
                openIcon: 'node-open',
                closeIcon: 'node-close'
            }
        },
        dfltType: 'nodeType'
    });
    var testObj = {property: {name: 'root'},
                        children:[
                            {property:{name:'node1'}},
                            {property:{name:'node2'},
                                children:[
                                    {property:{name:'node2.1'}}
                                ]
                            }
                        ]
                    };
    testTree.load(testObj);
    testTree.addEvent('onToggle',function(node, state){
        alert('Node '+node.name+(state ? 'expanded' : 'collapsed'));
    });
}

Re: Newbie

Ok lol i was just being stupid and not creating a container and the syntax for my json object was wrong. Just ignore me smile