Click to See Complete Forum and Search --> : disable enable


tiger66
06-14-2003, 09:00 AM
Hello
I am just wondering how can you use radio button to disable/enable certain fields

any example will be very much appreciated

Thanks

Charles
06-14-2003, 09:12 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<form action="">
<div>
<input type="text" name="field" onfocus="this.blur()">
<script type="text/javascript">
<!--
document.write('<input type="checkbox" name="enable" onclick="this.form.field.onfocus = this.checked ? function () {} : function () {this.blur()}">');
// -->
</script>
</div>
</form>