[Javascript] Disabled property for input

Peter Brunone peter at brunone.com
Mon Aug 19 12:03:25 CDT 2002


    According to the MSDN docs, that should work.  Also, as of IE5, you can
use an expression in place of the boolean value.

-Peter

----- Original Message -----
From: "Craig Gardner" <CGardner at JohnBurnham.com>


| So if I were to use "document.form.input.disabled = true;" it will work
| in
| internet explorer?  This form will be used internally, so I don't need
| to
| worry about compatibility.
|
| Thanks,
| Craig
|
| | -----Original Message-----
| | From: Peter Brunone [mailto:peter at brunone.com]
| |
| | Craig,
| |
| |     You only have the disabled option in Internet Explorer.
| | A slightly more universal solution (works for Netscape,
| | anyway) is to change the background color style attribute and
| | use the onFocus() event handler to set
| | window.focus() (or focus on whatever else you like to get
| | emphasis off the input field).
| |
| | -Peter
| |
| | ----- Original Message -----
| | From: "Craig Gardner" <CGardner at JohnBurnham.com>
| |
| | | I'm trying to set up a field that is disabled/enabled
| | depending on the
| | | value of another field, but I can't seem to find a disabled/enabled
| | | property for
| | | the fields.  Is there one?  Or do I have to go about this in another
| | | way?
| | |
| | | Thanks,
| | | Craig
| |




More information about the Javascript mailing list