[Javascript] ie and setAttribute('readonly')

Matt Warden mwarden at gmail.com
Mon Sep 3 13:45:37 CDT 2007


On 9/3/07, John Pillion <lists at jdpill.com> wrote:
> hi all,
>
> how can you set a input/textbox to readonly *in IE*?  I tried the
> setAttribute, and it doesn't seem to work for IE (while it does for
> ff/ns).

Do not use setattribute for attributes where there is a javascript property:

element.readonly = true;

-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the Javascript mailing list