Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Bill Jindrich on Jun 27, 2008 06:33
open dhtmlx forum
dhtmlXtree: enableLoadingItem

Can you please explain what scnerio enableLoadingItem() is intended to be used for & how to use it in code (please provide sample code)?

I was hoping that this was a way to display a message while the tree loaded. But I am getting errors trying to use it.
Answer posted by Support on Jun 28, 2008 03:51
To enable mode, dhtmlxtree_lf.js need to be included.
The mode enabled by
    tree.enableLoadingItem("Loading...");

After such command, each time when you open item, and tree send request to server for additional info ( dynamical loading mode ) - text of opened item will be replaced with message defined in enableLoadingItem, and restored back after data from server loaded. Basically it add visual representation of data loading

>> a message while the tree loaded.
If you need to show a custom message you can use
    tree.attachEvent("onXLS",function(){
       //code to show loading  message
    });

    tree.attachEvent("onXLE",function(){
       //code to hide loading message
    });