1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| <?php require_once('construire.php') ; ?>
<div class="container">
<!-- code qui va appeler mon php -->
<script>
function ficheclient(str) {
if (str == "") {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
var xmlhttp;
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
//ici j'ai ma variable que je récupère depuis un input (elle y arrive bien, j'ai verif via un console log)
var varsociete = $( "#client_societe" ).val();
}
}
};
xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.send();
}
}
</script>
<div id="txtHint">
<div class="alert alert-info">
<strong>Info:</strong> La fiche client va être chargée ici une fois une fois que vous aurez sélectionné votre client.
</div>
</div>
<?php include '../Include/footer.php' ; ?>
</body>
</html> |
Partager