Hi, I''m new to ajax and I''ve a little problem to sending parameters in order to be executed on the controller. Suppose that "function updatextable(e)" which is javascript function is called somewhere in the application (onDrop of draggable element). How can I send "e.value" to the controller in order to do some active record operations? Many thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Suppose that "function updatextable(e)" which is javascript function > is called somewhere in the application (onDrop of draggable element). > How can I send "e.value" to the controller in order to do some active > record operations?I suppose the same way you send any data in a HTTP request, whether that be by AJAX or not makes no difference. GET: http://example.com/resource?e=value POST: http://example.com/resource -- Form data -- e=value -- That is unless you want to take some more extreme measures like sending data to the server using something other than HTTP (i.e. Adobe Flash, a Java Applet, etc.). -- 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 -~----------~----~----~----~------~----~------~--~---
Ali wrote:> Hi, > > I''m new to ajax and I''ve a little problem to sending parameters in > order to be executed on the controller. > > Suppose that "function updatextable(e)" which is javascript function > is called somewhere in the application (onDrop of draggable element). > How can I send "e.value" to the controller in order to do some active > record operations? > > Many thanksThere is another topic right next to yours right now. Have a look at: http://www.ruby-forum.com/topic/172754#new I think it will answer your question. jp -- 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 -~----------~----~----~----~------~----~------~--~---