<input type="text" />
<input type="checkbox" />
<script>
checkbox=document.getElementsByTagName('input')[1]
input=document.getElementsByTagName('input')[0]
function handler(){
if(input.value.length>0){
checkbox.checked=true
}else{
checkbox.checked=false
}
}
if(input.addEventListener){
input.addEventListener('keyup',handler,false)
}
else{
input.attachEvent('onkeyup',handler)
}
</script>