Trying to send the text_field values from 2 fields back and I keep getting syntax errors no matter how I try to configure this... <%= observe_field(:right_controller, :update => "show_controller", :with => [:right_controller, :right_name], :url => {:action => ''show_controller''} ) %> this results in... Syntax Error... Request Parameters: {"right_controllerright_name"=>"case_managers"} How can I pass 2 values back? Thanks Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
<%= link_to_remote("Get Update", :update => "show_controller", :with => "Form.Element.serialize($(''right_controller'')) +'';''+Form.Element.serialize($(''right_name''))", :url => {:action => ''show_controller'' } ) %> gets me this back to controller, which is making me crazy... Parameters: {"action"=>"show_controller", "controller"=>"preferences", "right"=>{"controller"=>"case_managers;right[name]"}} I need some way to pass 2 values back to controller, preferably with observe_field but I''m accept ''link_to_remote'' Craig On Mar 26, 3:18 pm, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote:> Trying to send the text_field values from 2 fields back and I keep > getting syntax errors no matter how I try to configure this... > > <%= observe_field(:right_controller, > :update => "show_controller", > :with => [:right_controller, :right_name], > :url => {:action => ''show_controller''} ) %> > > this results in... > Syntax Error... > Request > > Parameters: {"right_controllerright_name"=>"case_managers"} > > How can I pass 2 values back? > > Thanks > > Craig--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Mar-27 08:18 UTC
Re: observe field sending 2 fields back to controller
On Mar 27, 12:45 am, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote:> <%= link_to_remote("Get Update", > :update => "show_controller", > :with => "Form.Element.serialize($(''right_controller'')) > +'';''+Form.Element.serialize($(''right_name''))", > :url => {:action => ''show_controller'' } ) %> >Try :with => "{right_controller: $F(''right_controller''), right_name: $F(''right_name'')}" Fred> gets me this back to controller, which is making me crazy... > > Parameters: {"action"=>"show_controller", "controller"=>"preferences", > "right"=>{"controller"=>"case_managers;right[name]"}} > > I need some way to pass 2 values back to controller, preferably with > observe_field but I''m accept ''link_to_remote'' > > Craig > > On Mar 26, 3:18 pm, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote: > > > Trying to send the text_field values from 2 fields back and I keep > > getting syntax errors no matter how I try to configure this... > > > <%= observe_field(:right_controller, > > :update => "show_controller", > > :with => [:right_controller, :right_name], > > :url => {:action => ''show_controller''} ) %> > > > this results in... > > Syntax Error... > > Request > > > Parameters: {"right_controllerright_name"=>"case_managers"} > > > How can I pass 2 values back? > > > Thanks > > > Craig--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Thu, 2008-03-27 at 01:18 -0700, Frederick Cheung wrote:> > > On Mar 27, 12:45 am, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote: > > <%= link_to_remote("Get Update", > > :update => "show_controller", > > :with => "Form.Element.serialize($(''right_controller'')) > > +'';''+Form.Element.serialize($(''right_name''))", > > :url => {:action => ''show_controller'' } ) %> > > > > Try :with => "{right_controller: $F(''right_controller''), right_name: > $F(''right_name'')}" >---- that worked perfectly for both observe and for link_to_remote...many thanks. Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---