开发者

Zend - Jquery Post values can't find ..?

开发者 https://www.devze.com 2023-01-04 23:10 出处:网络
Overflowers\': I\'m开发者_JAVA百科 using Zend, and doing an Ajax post to a controller. I can determine in the

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号