merci pour le lien, bien util.
désolé si j'avais pas ete assez clair, j'ai trouve la solution. Mon fameu "xhr.onreadystatechange = function(){" etait quelques lignes trop haut :(.
Du coup, j'arrive pas a comprendre comment ca pouvait marcher avant
je met une partie du source du avant apres si a peu aider quelqu'un d'autre :)
AVANT :
function calendar(mois,act) {
xhr.onreadystatechange = function(){
if ( xhr.readyState == 4 )
{
document.getElementById("calend").innerHTML = xhr.responseText;
}
}
xhr.open("POST", "calendrier.php", true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.send("mois="+mois+"&act="+act);
}
*** jamais compris comment il lancait la fonction function() vu que le xhr.reponsetext est charge apres.
APRES
function calendar(mois,act) {
xhr.open("POST", "calendrier.php", true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.send("mois="+mois+"&act="+act);
xhr.onreadystatechange = function(){
if ( xhr.readyState == 4 )
{
document.getElementById("calend").innerHTML = xhr.responseText;
}
}
*** la ca marche a tout les coups
voila merci a bientot
}