I’m desperately trying to update a div when a key is pressed in a text
field.
Eg. :
<%= observe_field :field, :url => {:action => :myAction}, :update =>
:area, :with => "text_param", :on => 'keypress' %>
This does not seem to work, and I can’t understand why. Does someone
have any clue on what I am doing wrong ?
Thanks in advance
I don’t use AJAX, but I’ll see if I can help.
Just some thoughts:
- Right click on the loaded page and view source to make sure
javascript is in the headers. Maybe observe_field isn’t being loaded.
- Instead of using keypress, does it work with frequency? I know that
is not what you want, but it might give you some ideas.
- Try text_field_tag as well for the input.
Thanks for you reply !
- Right click on the loaded page and view source to make sure
javascript is in the headers. Maybe observe_field isn’t being loaded.
Yep, it’s loaded.
- Instead of using keypress, does it work with frequency? I know that
is not what you want, but it might give you some ideas.
Already done that, and yes, it works very well.
- Try text_field_tag as well for the input.
Just tried, but it doesn’t work either. I really don’t know what to try
next…
Thanks anyway