Hi,
I need to send a parameter (named table_name) to my php file on the server.
I saw in the documentation that I could use the POST method.
That’s what I did in the following code, but I don’t get the data in my php file.
However, I use POST method to send data to my php file with $.ajax() and it works perfectly.
Works :
$.ajax({
url : 'php/remove_user.php',
type : 'POST',
data : 'id='+id_user,
...
Does not work:
var movies_data_source =
{
url : 'php/get_movies.php',
type : 'POST',
data : 'table_name=Collection_1_1',
dataType : 'xml',
id: 'Id',
datafields: [
{ name: 'Id', type: 'string' }
],
root: 'Movies',
record: 'Movie'
};
var dataAdapter = new $.jqx.dataAdapter(movies_data_source, {
loadComplete: function (data) {
var records = dataAdapter.records;
var length = records.length;
alert('loadComplete length = ' + length);
},
});