I am trying to pass a value from one field to another, real-time. But onChange does not work here, while onFocus and even onBlur do. Why is that, or how else can I pass a value real-time?
document.testForm.secondField.value = str;
<form name=testForm action="">
<input type=text name=firstField size=10 value="" onChange="passText(this.value);" />
<input type=text name=secondField size=10 value="" />
[Edit: I found it: it is a structural property of onChange that one has to navigate out of the object for it to take effect. See http://msdn.microsoft.com/en-us/library/ms536912%28v=vs.85%29.aspx. And onBlur will do the job as well.]