Onblur to work with select

I need a method to be called upon an ‘onblur’ event when a select list
is no longer the focus - ideally, I would like it to work when the
‘Enter’ key is hit. But, I am just trying to get the onblur to work,
here is what I got:

<%= select( “airlinemembership”, “membership”, Airline.find( :all,
:order =>
‘name’ ).collect { |a| [a.name.downcase.capitalize, a.id]},
{:update => ‘exclude_1’}, {:onblur => ‘set_exclude_airline_1’} ) %>

Any ideas on how I can get the method ‘set_exclude_airline_1’ to fire?
Thanks,

-S

Hi,

I have tried to do this, but if you delve into the prototype
javascript definitions I think the on blur is not actually implemented
even though rails includes the option. I believe there is a way to
detect the enter key in js, but I cant recall exactly how. What I
ended up doing was to add a dummy field following the field I want to
detect the blur. I then detect the on focus to do the call to remote,
where I then do my update and use set focus to move to the next field.

Not ideal, but it achieves the desired result.

Tonypm