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' }
});
}
})
精彩评论