This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
larpe/larpe/tags/release-1.0/root/larpe/js/listing.js

42 lines
1.1 KiB
JavaScript

var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) { xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
function updateListing(e) {
xmlhttp.open("POST", "ajax_listing", true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
document.getElementById('listing').getElementsByTagName('TBODY')[0].innerHTML = xmlhttp.responseText;
displayForm();
}
}
elems = document.getElementById('listing').getElementsByTagName('SELECT');
val = "";
for ( i = 0; i < elems.length; i++ ) {
elem = elems[i];
val = val + elem.name + "|" + elem.value + "\n";
}
xmlhttp.send(val);
}
function displayForm() {
document.getElementById('listing').getElementsByTagName('THEAD')[1].style.display = 'table-header-group';
}
displayForm();