Add 2007.js

This commit is contained in:
sedlav 2024-02-16 21:56:46 +00:00
commit 7785f4e34d
1 changed files with 28 additions and 0 deletions

28
2007.js Normal file
View File

@ -0,0 +1,28 @@
var xmlhttp = false;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
xmlhttp.overrideMimeType('text/xml');
} else if (window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
var categoryId = document.getElementById('action').value;
var categoryId = document.getElementById('category[id]').value;
var url = 'scripts/categorypos.php?parent=' + parent + '&categoryid=' + categoryId + '&action=' + action;
xmlhttp.open('GET', url, true);
xmlhttp.onreadystatechange = refreshCategories;
xmlhttp.send(null);
function refreshCategories( ) {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
try {
// Refrescar categorías
} catch (e) {
alert(e.message);
}
} else {
document.getElementById('position').innerHTML = 'Error: No Pos';
}
}