Hi there,
I suppose the mistake is in passing in a string to parameters. Better
do it like this:
> new Ajax.Request("/edit/doorhangers/add_ajax/",
> {
> encoding: 'UTF-8',
> method: 'post',
> parameters: {qty: $F('qty'), size: $F('size'), stock:$F('stock'),
> sides:$F('sides'), price: $F('price') } ,
> onComplete: showResponse
> });
> }
Found on http://www.prototypejs.org/api/ajax/options
Cheers,
Rudi.
On Fri, Jan 14, 2011 at 3:53 PM, ehickstech <[email protected]> wrote:
> Thanks for responding. I'm sending via POST. Here's the script
>
> function sendRequest() {
> new Ajax.Request("/edit/doorhangers/add_ajax/",
> {
> encoding: 'UTF-8',
> method: 'post',
> parameters: 'qty='+ $F('qty') + '&size='+ $F('size') +
> '&stock='+ $F('stock')
> + '&sides='+ $F('sides') + '&price='+ $F('price'),
> onComplete: showResponse
> });
> }
>
> The stock field has values in it like "100# Glossy Cover". When I
> echo it from the AJAX function, it just says "100"
>
> --
>
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.