Hi, Steve

You must pass obj in content

    *var* deferred = dojo.xhrPost({

      url: "addtonest",

      content: obj

    });


And just var_dump($params) in controller.

--

2010/5/26 Steve Rayner <[email protected]>

>  Sorry if this is not the correct list to be posting regarding dojo...
>
>
>
> I have this in my javascript function, that creates an AJAX request to my
> server;
>
>
>
>     // Create an object to hold the data.
>
>     *var* obj = {nest_id:1, component_id:1};
>
>
>
>     // Convert to data to a string.
>
>     data = dojo.toJson(obj);
>
>
>
>     // Show the string in the console.
>
>     console.log(data, *typeof* data);
>
>
>
>     *var* deferred = dojo.xhrPost({
>
>       url: "addtonest",
>
>       content: data
>
>     });
>
>
>
> So what would i need in my controller to retrieve the values for nest_id
> and component_id?
>
>
>
> I have this in my controller but it just returns null;
>
>
>
>     $params = Zend_Json::decode($this->_request->getPost());
>
>     var_dump($params);
>



-- 
Георгий, +7 921 384 81 25

Reply via email to