Observe_field and :on

Hi all,

for some reason when i am using :on => “keyup”(or any other value)
parameter for observe_field, it doesn’t work at all. This code:

<%= text_field_tag :search_for_user,"" %>
<%= observe_field :search_for_user, :on => “keyup”, :url => {
:controller => ‘user’, :action => :ajax_find_for_group}, :update =>
:suggest_user, :with => “‘search_value=’+value” %>

gives:

//<![CDATA[ new Form.Element.EventObserver('search_for_user', function(element, value) {new Ajax.Updater('suggest_user', '/user/ajax_find_for_group', {asynchronous:true, evalScripts:true, parameters:'search_value='+value})}) //]]> </script> <p>I know that there is no :on parameters for observe_field in<br> documentation, but i notice some people using it with success on forums.<br> Is there some kind of patch or something? Help!</p> <p>rails 2.3.2, ruby 1.8.7</p>

ok, i found out that there is no :on parameter for observe_field
i noticed that it’s not in documentation but found some examples where
people use it. i suppose they have some patched or older version of
rails where this was supported.

so, seems it’s not possible to use “onkeydown” property of text field
with observe_field without patches.

installed autocomplete plugin instead

thanks for help everybody!)