On Jan 14, 2: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 might be sending by POST, but you are creating a query string as used in a GET, so you would need to uri_encode. If you are using POST, you don't need build a string like that anyway. As others have suggested, giving Ajax.Request an object is a better solution. -- 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.
