<br><br><div><span class="gmail_quote">On 9/1/07, <b class="gmail_sendername">John Pillion</b> &lt;<a href="mailto:john@conv-dg.com">john@conv-dg.com</a>&gt; 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.&nbsp;&nbsp;I&#39;m trying to mark a text box as readonly<br>(from a &#39;yes/no&#39; 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>&nbsp;&nbsp;&nbsp;&nbsp;var txtBox = document.forms[&quot;bldForm&quot;].elements[&quot;bldName&quot;];<br><br>&nbsp;&nbsp;&nbsp;&nbsp;if (disabledValue.toLowerCase() == &quot;y&quot;){<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;txtBox.setAttribute(&#39;readonly&#39;,&#39;readonly&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp;}else{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;txtBox.removeAttribute(&#39;readonly&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br><br><br>I saw elsewhere that the following sometimes is more reliable for IE to
<br>do the following:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;txtBox.setAttribute(&#39;readonly&#39;,&#39;&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp;txtBox.readonly = &#39;readonly&#39;;<br><br>this does not work either though, nor does<br><br>&nbsp;&nbsp;&nbsp;&nbsp;txtBox.readonly = &#39;readonly&#39;;
</blockquote><div><br><br>try txtBox.disabled = &#39;disabled&#39;;<br><br><br></div></div>-- <br>Anthony Ettinger<br>Ph: 408-656-2473<br>var (bonita, farley) = new Dog;<br>farley.barks(&quot;very loud&quot;);<br>bonita.barks
(&quot;at strangers&quot;);<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>