<br><br><div><span class="gmail_quote">On 9/1/07, <b class="gmail_sendername">John Pillion</b> <<a href="mailto:john@conv-dg.com">john@conv-dg.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
k, I have another question. I'm trying to mark a text box as readonly<br>(from a 'yes/no' radio pair, where disabledValue is the value from the<br>radio button - this part works fine). Below is the portion of code,
<br>which will not work in IE7 (possibly all versions of IE?).<br><br><br> var txtBox = document.forms["bldForm"].elements["bldName"];<br><br> if (disabledValue.toLowerCase() == "y"){<br>
txtBox.setAttribute('readonly','readonly');<br> }else{<br> txtBox.removeAttribute('readonly');<br> }<br><br><br><br>I saw elsewhere that the following sometimes is more reliable for IE to
<br>do the following:<br><br> txtBox.setAttribute('readonly','');<br> txtBox.readonly = 'readonly';<br><br>this does not work either though, nor does<br><br> txtBox.readonly = 'readonly';
</blockquote><div><br><br>try txtBox.disabled = 'disabled';<br><br><br></div></div>-- <br>Anthony Ettinger<br>Ph: 408-656-2473<br>var (bonita, farley) = new Dog;<br>farley.barks("very loud");<br>bonita.barks
("at strangers");<br><br><a href="http://chovy.dyndns.org/resume.html">http://chovy.dyndns.org/resume.html</a><br><a href="http://utuxia.com/consulting">http://utuxia.com/consulting</a>