Hey,
My assumption is that the treeview works in a different way; for instance, it may not necessarily take whatever was the last set value was (which javascript changes), but actually responds to a physical user click only instead. If that is the case, I don't know how you can change the behavior of the control to do what you want to do.
Brian
"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).