<script> form.input1.onchange = function(){ if (this.value.length() == this.maxLength) form.edit2.focus(); } ; </script>