javascript - Posting JSON string using dojo.xhrPost -


I try to post JSON string using a dojo.xhrPost for a flag framework The controller is doing

When I post the string to the server, no data is sent to me. I have also tried to send "a test string", even that it is not being sent too.

I dump a var to see the content of the request, but as clear as the day, there is no parameter or the data I am posting. My code looks like this:

  var jsonStr = dojo.toJson (value); Var xhrArgs = ({url: "/ dojo / savedetails /", postData: jsonStr, handles: "text", load: function (data) {if (data == 'success') {// success code dojo.byId ( 'Edit_alert'). InnerHTML = '

The contents of my var_dump ($ this- & gt; _request) are :

  object (Zend_Controller_Request_Http) # 118 ( 14) {["_paramSources": protected] = & gt; Array (2) {[0] = & gt; String (4) "_GET" [1] = & gt; String (5) "_POST"} ["_requestUri": protected] = & gt; String (25) "/ Dojo / Reserved /" ["_baseUrl": Protected] = & gt; String (0) "" ["_basePath": protected] = & gt; NULL ["_pathInfo": protected] = & gt; String (25) "/ Dojo / Reserved /" ["_params": Protected] => Array (3) {["controller"] = & gt; String (4) "Dojo" ["Action"] = & gt; String (18) "Savings" ["Module"] = & gt; String (7) "default"} ["_aliases": protected] = & gt; Array (0) {} ["_dispatched": protected] = & gt; Bull (true) ["_module": protected] = & gt; String (7) "default" ["_moduleKey": protected] = & gt; String (6) "module" ["_controller": protected] = & gt; String (4) "Dojo" ["_controllerKey": Protected] = & gt; String (10) "Controller" ["_action": Protected] = & gt; String (18) "selection" ["_actionKey": protected] = & gt; String (6) "Action"}  

I hope I am missing something easily, but I am following the documentation on dojotoolkit.org, and with their examples doing this work needed.

I'm using Dojo 1.3 and Zend Framework 1.9 if it helps.

Thank you,

If you have to pass in the postcard , you need to use the dojo.rawXhrPost instead of dojo.xhrPost . .


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -