3.2.0

IE6 Input Remove Readonly

I know this topic has been convered a few times on the forums but I can't get the solutions to work for IE6 however it works fine in FF3.6.

The follow code sample demonstrates the problem:
<html>
<head>
  <link rel="stylesheet" type="text/css" href="/ActiveWidgets255/runtime/styles/aqua/aw.css" />
  <script src="/ActiveWidgets255/source/lib/aw.js"></script>
</head>
<body>
  <script>
    var obj = new AW.UI.Input;
    obj.setId("obj");
    obj.setControlText("text value");
    obj.getContent('box/text').setAttribute('readonly',true); 
    document.write(obj);

    var button = new AW.UI.Button;
    button.setId("button");
    button.setControlText("push me");
    button.onControlClicked = function(event){ 
      obj.getContent('box/text').setAttribute('readonly',''); 
    } 
    document.write(button);
  </script>
</body>
</html>


Now, I have also tried the caching fix Alex has posted previously and
<html>
<head>
  <link rel="stylesheet" type="text/css" href="/ActiveWidgets255/runtime/styles/aqua/aw.css" />
  <script src="/ActiveWidgets255/source/lib/aw.js"></script>
</head>
<body>
  <script>
    var obj = new AW.UI.Input;
    obj.setId("obj");
    obj.setControlText("text value");
    obj.getContent('box/text').setAttribute('readonly',true); 
    document.write(obj);

    var button = new AW.UI.Button;
    button.setId("button");
    button.setControlText("push me");
    button.onControlClicked = function(event){ 
      obj.getContent('box/text').setAttribute('readonly',''); 
      obj.getContent('box')._outerHTML = ""; 
      obj.getContent('box')._innerHTML = ""; 
      obj._outerHTML = ""; 
      obj._innerHTML = ""; 
      obj.refresh();  
    } 
    document.write(button);
  </script>
</body>
</html>


Anyone have any ideas? Both scenarios work fine in FF but I can't get either to work in IE6.
Mike
March 19,
Changing

obj.getContent('box/text').setAttribute('readonly','');


to

obj.getContent('box/text').setAttribute('readOnly','');


resolved the problem.
Mike
March 19,
Or also:
obj.setControlDisabled(true);
March 19,

This topic is archived.

See also:


Back to support forum