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:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.