document.getElementById("ID").value = "Tamer Jarrar";
<input type="text" value="" onchange="updateInput(this.value)" />
<script>
function updateInput(ish){
document.getElementById("fieldname").value = ish;
}
</script>
<input type="text" id="example"> // Setup text field
<script type="text/javascript">
document.getElementById("example").setAttribute('value','My default value');
</script>
function updateInput(ish){
document.getElementById("fieldname").value = ish;
}