``Prototype.js`` provides the ``bind`` function which lets you bind a function to a specific context (this):

    onSuccess: function(transport) {
      ...
      this.errorMessage.removeClassName('hidden');
      ...
    }.bind(this),