:: Forum >>

Disabling a button in 2.0.2

From the 2.0.2 new features list I understood we can now disable all controls. Does anyone know how to enable/disable a button? I tried the following:

var obj = new AW.UI.Button;
obj.setControlText("Button1");

obj.onClick= function() {
alert("Button clicked");
}

obj.setAttribute('disabled', 'true');
document.write(obj);
----
This however disables the button text but still allows you click on it. In addition it still highlights when you move the mouse over it.

Please advice.

Maurice
Friday, March 9, 2007
Should be

obj.setControlDisabled(true);

see also /examples/controls - all/disable.htm
Alex (ActiveWidgets)
Friday, March 9, 2007
Sometimes life is easy.

Thanks a lot
Maurice
Saturday, March 10, 2007

This topic is archived.


Back to support forum

Forum search