<!DOCTYPE html>
<html>
<xsl:stylesheet version="1.0" xmlns
sl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Mes Chantiers</h2>
<table border="1">
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<style>
table,th,td {
border : 1px solid black;
border-collapse: collapse;
}
th,td {
padding: 5px;
}
</style>
<body>
<table id="Chantier"></table>
<script>
var x,xmlhttp,xmlDoc
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "/GL/30/Propositions.xml", false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML;
x = xmlDoc.getElementsByTagName("T_PJ");
table="<tr><th>Date</th><th>Enreg.</th><th>NbDep.</th><th>Chant.</th>";
for (i = 0; i <x.length; i++)
{
table += "<tr onclick='VoirPJ(" + i + ")'><td>";
table += x[i].getElementsByTagName("dDate")[0].childNodes[0].nodeValue;
table += "</td><td>";
table += x[i].getElementsByTagName("dNomG")[0].childNodes[0].nodeValue;
table += "</td><td>";
table += x[i].getElementsByTagName("dNomG1")[0].childNodes[0].nodeValue;
table += "</td><td>";
table += x[i].getElementsByTagName("dNomG2")[0].childNodes[0].nodeValue;
}
document.getElementById("Chantier").innerHTML = table;
function VoirPJ(i) {
file_get_contents('Joueurs.txt');
unserialize();
}
document.getElementById("Chantier").innerHTML = table;
</script>
</body>
</html>
Partager