How to get observe_field to work with :on => keyup?

Hi All,

I’ve be looking all over for a definitive answer to this question but
it’s eluding me.

There are many, many examples of the use of observe_field that include
:on => ‘keyup’ – supposedly allowing one to bind an onkeyup event to a
form element, etc. I have tried every-which-way to get this to work and
it does not. When I bore into the code of prototype.js, I can see why:
the binding has the ‘change’ event hard-coded into it –

Event.observe(element, ‘change’, this.onElementEvent.bind(this));

. . . and when I edit it to ‘keyup’, it does, in fact, catch the onkeyup
event.

This being the case, how in the world do people get this to work with
something other than a change event – barring a re-write of the
prototype code?

For reference, I’m using RadRails on Mac OS X 10.6 with rails 2.3.4 and
prototype.js 1.6.0.3

Thanks in advance,

Mark