So, I have a simple bit of code that asks a user to confirm that they
want to change the existing value of a text field:

Event.observe(this._form['txtFld'], 'change',
this.txtFldChanged.bindAsEventListener(this), false);
this._txtFld = this._form['txtFld'].value;
function txtFldChanged(e)
  var confirmed = (this._txtFld == '');

  if (! confirmed)
    confirmed = confirm('Are you sure you want to change the value of

  if (! confirmed)
    this._form['txtFld'].value = this._txtFld;

  return confirmed;

In FF, this works fine, every time you edit the content of the field.
In IE, it works once - after that the change event does not fire. I've
seen some mention of a possible behavior issue in IE having to do with
modification of the text field value programmatically within the event
bubble for the field's change event, but nothing concrete.

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to