3.2.0

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.setId("obj");
    obj.setClass("text", "normal");
    obj.getContent("box/text").setAttribute("readonly", true);
    obj.getContent("box/text").setStyle("color", "#808080");
    obj.setControlText("test");


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

alert(obj.toString());


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.

obj.toString();
Mike
July 11,
Mike,

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 -

http://www.activewidgets.com/javascript.forum.16359.7/input-text-and-input-password.html

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