J'ai ajouter à goesp
xhr.send("site="+idsite);
Je n'ai plus l'erreur Undefined index: site in traitementAjaxL2.php
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 function goesp(){ var xhr = getXhr(); xhr.onreadystatechange = function(){ if(xhr.readyState == 4 && xhr.status == 200){ leselect = xhr.responseText; document.getElementById('spbaie').innerHTML = leselect; } } xhr.open("POST","traitementAjaxL2.php",true); xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); var sel = document.getElementById('batiment'); var idbatiment = sel.options[sel.selectedIndex].value; xhr.send("batiment="+idbatiment); xhr.send("site="+idsite); };
Mais ma troisième liste déroulante ne fonctionne plus.
Une idée ?
Partager