Hi, When using an :update in a remote function it does work without problems. Removing it and adding instead a .rjs file to modify a part of the HTML doesn''t work. This is what receives the browser: Element.update("content_pane", "--- TEST-CONTENT ---") But it just ignores it. There is no error in the javascript console. The tag used is: <%= collection_select "user", "id", @users, "id", "firstname", { }, { :id => "selectUserList", :class => "width100", :onchange => remote_function( :with => "''id='' + value", :url => { :action => :select_user } ) } %> As said, if I just use the :update => "content_pane" approach, it does work without problems. Do you know what can be wrong ? Thanks in advance. Any comment would be really welcome, I''m a bit lost here.. -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Well, I continue fighting against this issue. As far as I can tell from everything I''ve googled, you can''t use remote_function with a RJS due to the JS implementation. A link_to_remote will do (I''ll try that this night at home) Anyway, I''d need to use it in a collection_select context, where the onchange event must run a RJS template, so the link_to_remote doesn''t seem to be the best idea. Do you know if is there any alternative to run RJS templates to be used with events ? -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
<%= collection_select "user", "id", @users, "id", "firstname", { }, { :id => "selectUserList", :class => "width100" } %> <%= observer_field ''selectUserList'', :url => { :action => :select_user } %> This will automatically submit to the given URL and pass the selects value in parasm[:user][:id] and it works with RJS from what i know an experienced. In fact i wonder why remote_function doesn''t, as the API states it can have the same options as link_to_remote, which sounds like "you can leave out :udpate and use RJS" ... might have a look at it''s source to see what''s the reason. On 17 Okt., 09:21, "Juan Medín" <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Well, I continue fighting against this issue. As far as I can tell from > everything I''ve googled, you can''t use remote_function with a RJS due to > the JS implementation. A link_to_remote will do (I''ll try that this > night at home) > > Anyway, I''d need to use it in a collection_select context, where the > onchange event must run a RJS template, so the link_to_remote doesn''t > seem to be the best idea. > > Do you know if is there any alternative to run RJS templates to be used > with events ? > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry, the problem is rforum. I''ve "installed" rforum 0.2 and since then it fails. The RJS file is executed, the JS sent to the browser but without success... Does anyone have any clue about how to solve this ? Best regards, Juan -- 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?hl=en -~----------~----~----~----~------~----~------~--~---