开发者

How to used Ext.data.Request

I would like used Ext.data.Request to send request to my server. But i don't know how to that ?!

I want to push in submit button and it send request to insert data into my database. Insert is开发者_运维知识库 manage by an other page !

Thanks to helps :)


Maybe you mean Ext.Ajax.request? I think Ext.data.Request not that you need.

Code will be look like this:

new Ext.Button({
    text: "My button with Ajax",
    handler: function () {
        Ext.Ajax.request({
            url: 'foo.php',
            success: function (){alert('All good!');},
            failure: function (){alert('Fail...');},
            headers: {
                'my-header': 'foo'
            },
            params: { foo: 'bar' }
        });
    }
})
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜