Andy wrote:
> I'm using jQuery with Rails3.
>
> I'd like to trigger some AJAX on the change of a SELECT element.
>
> I've tried the old Prototype way: {:onchange
> =>remote_function(:update => "mytable", :url => "/xxx")}
>
> I get a JS error: "Ajax is not defined"
>
> I assume it's trying to use Prototype and that's where the error comes
> from.
>
> I'd love to use Unobtrusive Javascript, but I don't want to submit the
> WHOLE form.
[...]
What's that got to do with it? You can still do the onchange handler
unobtrusively (and you should). Just use the DOM to find the element
you need, and apply the handler.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
--
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.