I am making a website in Jquery. Here I m trying to parse an xml. I've got one file m_xml.js who get my xml and the c_parseXml.js who will parse it. But I can't get the file to the parse.js file look :
function test() {
RameneXml(function(output) {
return output;
});
}
function RameneXml(handleData) {
$.ajax({
type: "GET",
url: "web/xml/calendrier.xml",
dataType: "xml",
async: "false",
success: function(xml) {
handleData(xml);
}
});
}
It's my m_xml file. and with this file I want to get it in a variable. look my file parseXml.js
function DonnerDiffusion() {
output = test();
console.log(output);
}
but in the console I can see undefined
What have I do Wrong ? Thanks