i want to pass the data returned by a javascript function and the file name to a php page using ajax and then write that data in a file开发者_StackOverflow i.e takinf the file name from ajax post appending that name with .xml and finally writing that data to xml file.
For Posting use jquery post
$.post("myxmlpage.php", //your url
{ "data1": "data1value", "data2": "data2value"}, //data values
function(data){ //Your onsuccess call backfunction
alert(data.name);
console.log(data.time);
}, "json" //retun data type //can be html/json/xml/text
);
For writing to xml file. check this link,
精彩评论