L
Lovens Weche
I'm trying to set the "readonly" attribute of a "textarea" element this way:
---------------------------------
<script type="text/javascript">
***snip***
//-- create text area element --
var objTextArea;
objTextArea = document.createElement('textarea');
objTextArea.setAttribute('id', 'textArea' + this.InfoBoxID);
objTextArea.setAttribute('rows', this.TextAreaRows);
objTextArea.setAttribute('cols', this.TextAreaCols);
objTextArea.setAttribute('readonly', 'readonly');
document.getElementById('masterDiv').parentNode.appendChild(objTextArea);
document.getElementById('textArea' + this.InfoBoxID).style.position =
'absolute';
document.getElementById('textArea' + this.InfoBoxID).innerHTML =
textInTextArea;
//------------------------------
***snip***
</script>
</head>
<body onload="Onload();" bgcolor="#FFFF99">
<div id="masterDiv"></div>
</body>
---------------------------------
In this code, the textarea is never set to read only. I can always change
the content.
Also how can I had a node without the need to create the <div> masterDiv??
Thanks in advance!
=============================
Lovens Weche
Sirinik Team - "Games you can't live without"
www.sirinikteam.com
=============================
---------------------------------
<script type="text/javascript">
***snip***
//-- create text area element --
var objTextArea;
objTextArea = document.createElement('textarea');
objTextArea.setAttribute('id', 'textArea' + this.InfoBoxID);
objTextArea.setAttribute('rows', this.TextAreaRows);
objTextArea.setAttribute('cols', this.TextAreaCols);
objTextArea.setAttribute('readonly', 'readonly');
document.getElementById('masterDiv').parentNode.appendChild(objTextArea);
document.getElementById('textArea' + this.InfoBoxID).style.position =
'absolute';
document.getElementById('textArea' + this.InfoBoxID).innerHTML =
textInTextArea;
//------------------------------
***snip***
</script>
</head>
<body onload="Onload();" bgcolor="#FFFF99">
<div id="masterDiv"></div>
</body>
---------------------------------
In this code, the textarea is never set to read only. I can always change
the content.
Also how can I had a node without the need to create the <div> masterDiv??
Thanks in advance!
=============================
Lovens Weche
Sirinik Team - "Games you can't live without"
www.sirinikteam.com
=============================