Bonsoir,

J'ai fais une fonction que voici :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
                function valider(note,numVote,id_entreprise,id_avis) {
                        var xhr = getXhr();
                        votes.push(numVote);
 
                        done=true;
                        xhr.onreadystatechange = function() {
                                if(xhr.readyState == 4 && xhr.status == 200){
                                        if(xhr.responseText != "")
                                                alert(xhr.responseText);
                                        else
                                                alert('vide');
                                }
                        }
 
                        xhr.open("GET","ajaxNoterAvis.php?id_entreprise="+id_entreprise+"&note="+note+"&id_avis="+id_avis,true);
                        xhr.send(null); 
                }
Le trucs, c'est que je n'arrive pas a affiche d'alerte que si ajaxNoterAvis.php a renvoyer une valeur

Auriez vous une idée ?