Tag Archives: Dojo

Dojo, setAttribute with Internet Explorer

I’m working on a web application that I didn’t make myself & it has been done using Dojo & specially Dijit.
The part which I’m struggling with is approximately a form that gets changed depending on radio buttons.
Therefore, I’m using dijit.byId('id').setAttribute('disabled',true); to disabled a field & this works on FF yet not with IE8. Although, it works yet not directly when I check the radio button, I have to do one more action (like clicking in a random area on the page) & the action is applied. I tried with stuff like: document.getElementById('id').disabled=true; yet it doesn’t work correctly either.

Would you please have any suggestion?
Thank you.

Dojo Widgets have a convention to set attributes using the set method.

This convention will call the _setDisabledAttr method on the widget which will take care of making itself disabled.

http://dojotoolkit.org/reference-guide/1.7/dijit/_WidgetBase.html#attributes