Hi folks. I am guessing this is the place to discuss the Prototype AJAX JS library. I am not using Ruby, but nonetheless... Using ajax.updater, I want to submit a form which has 2 items in it. One is a radio button, straight forward. The other is a textarea that could be quite large. I want to park it into the url portion, but that would mean the url could supercede the safe length of a url for submission to my back door file that actually receives the parameters. How does one go about submitting textareas using ajax.updater? Cheers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
BeeRich wrote:> Using ajax.updater, I want to submit a form which has 2 items in it. > One is a radio button, straight forward. The other is a textarea that > could be quite large. I want to park it into the url portion, but that > would mean the url could supercede the safe length of a url for > submission to my back door file that actually receives the parameters.GET has a limit on the data it can send, but a POST does not. Ajax.Updater( { success: ''my_div'' }, ''/backdoor.cgi'', { method: ''post'', parameters: Form.serialize($(''my_form'')) } ); -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
BeeRich wrote:> OK, I was using post with the build. I''ve used form.serialize before > somewhere only once. I believe it''s passed as an array of pairs. Is > this correct?Correct, but it''s actually called an associative array (or hash). It''s not really an "array of pairs". -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
OK, I was using post with the build. I''ve used form.serialize before somewhere only once. I believe it''s passed as an array of pairs. Is this correct? Cheers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Just for completeness: Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs. If you are using the GET method, you are limited to a maximum of 2,048 characters, minus the number of characters in the actual path. However, the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL. Deco On Nov 1, 2006, at 10:00 AM, Michael Peters wrote:> > > > BeeRich wrote: > >> Using ajax.updater, I want to submit a form which has 2 items in it. >> One is a radio button, straight forward. The other is a textarea >> that >> could be quite large. I want to park it into the url portion, but >> that >> would mean the url could supercede the safe length of a url for >> submission to my back door file that actually receives the >> parameters. > > GET has a limit on the data it can send, but a POST does not. > > Ajax.Updater( > { success: ''my_div'' }, > ''/backdoor.cgi'', > { > method: ''post'', > parameters: Form.serialize($(''my_form'')) > } > ); > > -- > Michael Peters > Developer > Plus Three, LP > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Hi there. Why would they return it this way? Does JS provide maps at all? Would be easier to manage that way. Cheers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Hey, BeeRich a écrit :> Hi there. Why would they return it this way? Does JS provide maps at > all? Would be easier to manage that way.I''m not too sure I get what you mean, "why would they return it this way?". Aside from this, JS objects are a map of sorts (associations of property names with their values, usable with operators like ''.'' and ''[]'', modifiable at will, and iterable through the for/in construct), and Prototype takes this one step farther with the Hash object and the $H function. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
I guess I''m just used to a smilar structure of a larger map: var(''thing'' = map( ''firstname'' = ''Fred'', ''lastname'' = ''Flintstone'', ''colour'' = ''red'', ''friend'' = ''Barney'')); Cheers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---