I'm trying to change the value in one textfield from the value of another textfield without any submits. Example:
[Textfield 1 (type 'hello')]
[Textfield 2 ('hello' is inserted here as well)]
Below is my form:
<form action="#" id="form_field">
<input type="text" id="textfield1" value="">
<input type="text" id="textfield2" value="">
</form>
I don't know much about JavaScript, is this even possible? Would appreciate any help.
Thanks
<form action="#" id="form_field">
<input type="text" id="textfield1" value="" onKeyUp="document.getElementById('textfield2').value=this.value">
<input type="text" id="textfield2" value="">
</form>
see it in action: http://jsfiddle.net/4PAKE/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With