I got 3 fields: name, last name and concat.
What I have to do is concat the first character of the field name with the last name. And as I write, the field Concat is changing.
I have this by now:
<p>Name</p><input type="text" id="name" onChange="document.getElementById('concat').value=this[0].value;" />
<p>Last name</p><input type="text" id="last_name" document.getElementById('txt').value=document.getElementById('txt').value + this.value;"/>
<p>Concat</p>
<input type="text" id="concat" />
But the first character doesn't seem to be working, I think the problem might be in this[0].value; or how do I get the first chatacter, is there any other function to do it?.
Thanks, beforehand.
addEventListeneras a cleaner alternative to inlineon*handlers?