Randell D. wrote:
Deniz Adrian wrote: // This does not work (checkbox tick on & off is always permitted
// regardless if sp6 has a value or not...
<input name="mon6" type="checkbox" id="mon6" value="1"
onFocus="if(sp6.value){mon6.readOnly=false} else
{mon6.readOnly=true}">
try
> mon6.disabled=true;
instead of
> mon6.readOnly=true;
worx fine in my Firefox
best regards
deniz adrian
Luvely Juvely... Thanks for that!
randelld
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/str****ict.dtd">
<html>
<head>
<title>untitled</title>
<script type="text/javascript">
window.onload = function()
{
var f, el;
if (f = document.forms[0]
&& (el = f.elements.f6))
el.onfocus(); //keep it in sync
}
</script>
</head>
<body>
<form>
<input name="sp6" type="text" id="sp6" size="8" maxlength="24" />
<input name="f6" type="text" id="f6" size="10" maxlength="24"
onfocus="this.readOnly=!sp6.value" />
<input type="checkbox" onclick="this.checked=this.defaultChecked" />
<input type="checkbox" checked="checked"
onclick="this.checked=this.defaultChecked" />
</form>
</body>
</html>