onClick event for addButtonTwoState

Hi,

In the toolbar the type ButtonTwoState does not fire the onclick event attached to the toolbar like the other buttons etc do.

        myToolbar.addButtonTwoState("my_folders", 3, "mine", "open.gif", null);
        myToolbar.addButton("setup_folders", 4, "Add Folders", "new.gif", "open_dis.gif");
        myToolbar.attachEvent("onClick", myToolbarClick);

How do I attach an onclick event to a addButtonTwoState toolbar item?

Thanks James

Hi,

for the 2-state button you need to use onStateChange event:

toolbar.attachEvent(“onStateChange”,function(id,state){
/your code here/
})