Add 2007.js
This commit is contained in:
commit
7785f4e34d
|
@ -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';
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue