I have a text input and I want to handle the input's value when it changes. In IE and Firefox, I can do:
Code:
function handleChange() {
  var v = this.value;
  ...
}

var i = document.createElement('input');
i.type = 'text';
i.onchange = handleChange;
and pressing Enter or clicking in another field triggers handleChange() but in Opera, Enter doesn't do that. I've found conflicting references on the web that say Opera does or does not support onchange in text inputs. I tried adding this:
Code:
function handleKeyup(event) {
   var evt = new xEvent(event);
   if (evt.keyCode == 13) {
       handleChange.call(this);
       return false;
   }
   return true;
}
...
xAddEventHandler(i, 'keyup', handleKeyup, false);
and now pressing Enter triggers handleChange() twice in Opera. I tried using just a keyup handler in IE and that doesn't work at all. Any thoughts...