PDA

View Full Version : Ext JS - Send Data via GET



anfla
5 Mar 2012, 11:14 PM
I found some examples about sending data via AJAX to server. But there are still some questions left.
I was able to create my first AJAX request so far.


Ext.Ajax.request({

timeout: 1000,
url: 'php/myphp.php',
success: function(answer) {
alert(answer)
},
failure: setFailure,
headers: {
'my-header': 'foo'
},
params: 'foo=' . 'bar'
});

But this AJAX request doesn't seem to send any params. (Observed with firebug) Is there a way to send the data by GET to server?

mitchellsimoens
6 Mar 2012, 9:04 AM
Ext.Ajax.request({
url : '....',
method : 'GET',
params : {
foo : 'bar'
}
});