// Partie AJAX du site web : function mettreAjour() { nom = document.getElementById("listLog").value; //alert(nom); //chaine = "nomLog="+nom; //alert(chaine); $.ajax ({ type: "POST", url: "include/infolog.php", data: "nomLog="+nom, // dataType: "xml", success: function(xml){ //alert("Data Loaded: " + xml); /* $(xml).find('infos').each(function() { document.getElementById("type").innerHTML =$(this).find('domaine').text(); document.getElementById("description").innerHTML =$(this).find('commentaire').text(); document.getElementById("lien").innerHTML =$(this).find('lien').text(); } )*/ $(xml).find('infos').each(function(i, item){ $("#type").html($(item).find('domaine').text()); $("#description").html($(item).find('commentaire').text()); var url = $(item).find('lien').attr("href"); var str = $(item).find('lien').text(); $("#lien").html("" + str + ""); })}, error: function(){alert("marche pas");} }); }