David Johnson
2006-Sep-22 01:48 UTC
How to move data from a javascript control to the controller object?
I am using a javascript grid control, because I need a competent control to make a good GUI. HTML <table/> just isn''t quite enough in this case. I know how to address the cells of the grid control in javascript, but not how to move that data from the HTML page to the rails controller. Can someone please direct me to a tutorial on how to submit this data from the browser javascript context to the controller on the server? Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris Roos
2006-Sep-22 10:32 UTC
Re: How to move data from a javascript control to the controller object?
On 9/22/06, David Johnson <johnson_d-j9pdmedNgrk@public.gmane.org> wrote:> > I am using a javascript grid control, because I need a competent control to > make a good GUI. HTML <table/> just isn''t quite enough in this case. > > I know how to address the cells of the grid control in javascript, but not how > to move that data from the HTML page to the rails controller. > > Can someone please direct me to a tutorial on how to submit this data from the > browser javascript context to the controller on the server? > > Thanks in advance. >Does the javascript grid control just manipulate the contents of the DOM? If so, can you not just POST your revised data to the server (standard http post). Or if you needed more frequent data transfer you could probably have a javascript timer that uses AJAX to send the data to the server. Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David Johnson
2006-Sep-22 11:59 UTC
Re: How to move data from a javascript control to the controller object?
That was my first hope. No, the JS grid does not just maintain a <table/>. If it did, then the scaffold generated <% link-to ;action =>''update'' %> would have worked out of the box. I suspect that I will need to use some AJAX type programming techniques. I would certainly not object to getting my feet wet in that direction. Thanks, David Johnson On Friday 22 September 2006 05:32, Chris Roos wrote:> Does the javascript grid control just manipulate the contents of the > DOM? If so, can you not just POST your revised data to the server > (standard http post). Or if you needed more frequent data transfer > you could probably have a javascript timer that uses AJAX to send the > data to the server. > > Chris--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---