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:

<input id="search_for_user" name="search_for_user" type="text" value=""
/>
<script type="text/javascript">
//<![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>

I know that there is no :on parameters for observe_field in
documentation, but i notice some people using it with success on forums.
Is there some kind of patch or something? Help!

rails 2.3.2, ruby 1.8.7
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to