Entry
How can I enable\disable a textbox? For example: select Hi! enable and selecting Bye! disable?
Jan 10th, 2002 06:54
Sc0uSe, Erik Heidstra,
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE=Javascript>
function disable(OnOff) {
txtBox.disabled=OnOff;
}
</SCRIPT>
</HEAD>
<BODY>
<!-- this is the text box to enable/disable -->
<INPUT TYPE=TEXT name='txtBox' id='txtBox' VALUE='watch this space'>
<INPUT VALUE='DISABLE' TYPE=BUTTON onClick=disable(true);>
<INPUT VALUE='ENABLE' TYPE=BUTTON onClick=disable(false);>
</BODY>
</HTML>
Hope this helps,
Sc0uSe