<html>
<head>
<title>(Type a title for your page here)</title>
<script language="JavaScript">
<!--
function enable_text(status)
{
if (document.f1.chkbox.checked) {
document.f1.other_text.value=1;
}
if (!document.f1.chkbox.checked) {
document.f1.other_text.value="";
}
}
//-->
</script>
</head>
<body>
<form name=f1 method=post>
<input type="checkbox" name=chkbox onclick="enable_text(this)" > Set value in text box
<input type=text name=other_text>
</form>
</body>
</html>