2.0.1 - Input Field Attributes

I'm having a weird problem with a few of my input fields. With the following code, the readonly setting isn't working.

var obj = new AW.UI.Input;
    obj.setClass("text", "normal");
    obj.getContent("box/text").setAttribute("readonly", true);
    obj.getContent("box/text").setStyle("color", "#808080");

However, if I add the following as the next line, it all works just as it should.


I was hoping that showing the code would allow me to see where the problem is but again, it works when I add the alert and the code in the alert all shows up just fine. Any ideas on things I can try to make it work without the alert?

My work around at the moment is to add the following after my setControlText entry which doesn't create a popup but fixes the problem. I'd like a better answer however if possible.

July 11,

this is a bug in AW 2.0.1 and it is now fixed in AW 2.0.2, please see this topic for the background -


Basically the workaround for 2.0.1 is to clear the internal html fragments -

obj.getContent("box")._innerHTML = "";
obj.getContent("box")._outerHTML = "";
obj._innerHTML = "";
obj._outerHTML = "";

Alex (ActiveWidgets)
July 12,

This topic is archived.

See also:

Back to support forum