Re: [Proto-Scripty] Re: Passing the content of an array in a form
Le mardi 22 décembre 2009 05:11, joe t. a écrit : > For most typical cases, JSON is easier, and more efficient. For one, > by sending a Content-type header of "application/json" you can send an > array down from the server, and Prototype automatically converts it > into a JSON object you can utilize. I'm switching to json, and you're right, it is much easier to handle! -- Frédéric -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: Passing the content of an array in a form
On lundi 21 décembre 2009, joe t. wrote: > i may be misunderstanding the problem you're describing, but typically > when you submit an array of values with the same field name, you want > to use "[]" on the end of the field name. It's possible IE is > submitting the array in its object form, which the server is seeing as > string "[object]" and sending back untouched. If the fields are in > your HTML, they need an attribute like: > > or if the data is managed by your script, and passed in the > Ajax.Request as part of the parameters option, you still need to wrap > the name into a string: > { parameters: { "picts[]" : picts ... } } > > Sorry if that's on the wrong track. Thanks for the explanation. I was wondering: a better solution is may be to use json? What do you sthink about? -- Frédéric -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.