1) RichardForsterGroup: Members Posts: 2Joined: 3 Jan 2008Location: AustraliaIP: 136.186.--.--
Posted:
Hi all,
CheckTree works simply and as advertised with a static unordered list. However if the list is changed there doesn't seem to be a way of pointing CheckTree at it and saying 'do it again'. You can ask to have a new CheckTree based on the same list, but some of the critical initialization code is not executed. Anybody managed to find a work around?
Richard Forster
2) RichardForsterGroup: Members Posts: 2Joined: 3 Jan 2008Location: AustraliaIP: 136.186.--.--
Posted:
Er,
think I can answer my own question. Add the following as the last line in function CheckTree(myName) :
CheckTree.list[myName].init()
Haven't tried this in the situation of multiple trees, and maybe there should be some other code adjusted, but seems to work for me.
Richard Forster
3) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Sounds good! Yeah, the way the script is currently coded you have to re-initialise it when you modify the DOM, if I were to write it again in this post-AJAX world I'd make it just inspect the list on the fly :).