I am trying to use observe_field to get the famous 37signals YFT effect 
on form fields as they are modified.  So, in effect, I want to detect 
that a field has changed, and then cause the Prototype Highlight effect 
to happen on that field.
I am trying to do it using a statement like this:
<%= observe_field("preferences_x",
:function => visual_effect(:highlight, "preferences_x")) %>
which generates:
<script type="text/javascript">
//<![CDATA[
new Form.Element.EventObserver(''preferences_x'',
function(element, value)
{new Effect.Highlight("preferences_x",{});})
//]]>
</script>
I can sort of see that what I''ve provided for the function parameter is
not correct.  But to be honest, I''m not exactly sure what the problem
is
here.
Has anyone successfully used the :function argument to observe_field?
Thanks,
Wes
-- 
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---