Zend - Jquery Post values can't find ..?
Overflowers':
I'm开发者_JAVA百科 using Zend, and doing an Ajax post to a controller. I can determine in the Controller if it is a Ajax call using isXmlHttpRequest()..
However.. I can't find the value for my Posted JSON encoded data any where ?
I guess Zend strips it out, but its frustrating .. anyone have any idea where the Ajax posted values go?
-Patrick.
data[0]='bob';
data[1]='bob1';
data[2]='bob2';
tstring=$.toJSON(data);
$.ajax({
type: "POST",
url: "http://localhost/rr/test/post",
data: tstring,
async: false,
success: function(msg){
alert( "Returned:" + msg+ "end" );
}
});
my advice
Serializing to JSON in jQuery
your solution
Convert form data to JavaScript object with jQuery
精彩评论