Board Logo

'afterInit' and 'beforeInit' events
skylinesystems - 9/10/2006 at 08:09 PM

Hello. I am hoping I can change mouse pointer to hourglass while loading tree menu. I have about 5,000 items tree and loading menu takes about 5 seconds. So far I have changed "tree_tpl.js" file to below, but this does not work. It would turn hourglass and won't show menu tree. And hourglass won't change to default cursor at the end of loading either. Any suggestions are appreciated. Thank you.

# -- start of code -------

var TREE_TPL = {
'beforeInit':'hourglass_on',
'afterInit':'hourglass_off',
<more settings>..
};


function hourglass_off() {
document.documentElement.style.cursor = 'default';
}


function hourglass_on() {
document.documentElement.style.cursor = 'wait';
}

# -- end of code -------


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/