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 46 47 48 49 50
| <script>
function showListProductFromSelectedCategory(str) {
if (str == "") {
document.getElementById("productsGrid").innerHTML = "";
return;
} else {
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 (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("productsGrid").innerHTML = xmlhttp.responseText;
}
};
xmlhttp.open("GET","../view/showListProductFromSelectCat.php?q="+str,true);
xmlhttp.send();
}
}
function updateDataBase(id, content, column){
if (id == "") {
document.getElementById("productsGrid").innerHTML = "";
return;
} else {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","../model/updateDataBase.php?id="+id+"&content="+content+"&column="+column,true);
xmlhttp.send();
}
}
</script> |
Partager