Hey,
I'm trying to observe a field that is inside a form_tag like so:
<% form_tag 'send_mail' do %>
<%= select_tag 'select_club',
options_from_collection_for_select(clubs,'id','name'), :class =>
'ComboBox' %>
<%= observe_field 'select_club',:url=>{:action => 'clubs_changed'} %>
<% end %>
When I run this in FireFox gives me the following JavaScript error:
Form is not defined
and then points to the generated javascript:
new Form.Element.EventObserver('select_club', function(element, value)
{new Ajax.Request('/mailings/clubs_changed', {asynchronous:true,
evalScripts:true, parameters:value + '&authenticity_token=' +
encodeURIComponent('06f49bb619c38f8d0ea988932e4324abbd8511ef')})})
My html does contain a form so I don't exactly know where to look
anymore.
Thanks!
--
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
-~----------~----~----~----~------~----~------~--~---