Click to See Complete Forum and Search --> : disable text box.


Bryan Tuffin
01-22-2003, 08:57 AM
what do I have to add to the input of a text box so it is disabled when the page opens so you can not enter text. and how do I enable it using javascript.

Dan Drillich
01-22-2003, 09:30 AM
The following works in IE 5.


<FORM name="formx">
<p align="left">My investment is $
<input type=text size=10 value=100 name="a">

<SCRIPT LANGUAGE="JavaScript">
formx.a.disabled = true;
</SCRIPT>

......


Cheers,
Dan