<input type="text" value="" onchange="updateInput(this.value)" /> <script> function updateInput(ish){ document.getElementById("fieldname").value = ish; } </script>