Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1552 How do I disable a form field?

You are here: irt.org | FAQ | JavaScript | Form | Q1552 [ previous next ]

Try:

<form name="myForm">
<input name="myField" type="text" disabled onFocus="if (this.disabled) this.blur()">
</form>

<script language="JavaScript"><!--
document.myForm.myField.disabled=true;
//--></script>

The disabled attibute in the field itself is for Internet Explorer and Netscape Navigator 6+, the script is for Netscape Navigator 3 and Netscape Navigator 4.

Feedback on 'Q1552 How do I disable a form field?'

©2018 Martin Webb