infobox_callback: add exception handler

This commit is contained in:
Andrew Dolgov 2007-06-14 07:34:35 +01:00
parent fee51fc66b
commit aa8716da38
1 changed files with 20 additions and 15 deletions

View File

@ -1396,24 +1396,29 @@ function infobox_submit_callback() {
function infobox_callback() {
if (xmlhttp.readyState == 4) {
if (!is_msie() && !getInitParam("infobox_disable_overlay")) {
var overlay = document.getElementById("dialog_overlay");
if (overlay) {
overlay.style.display = "block";
}
}
try {
var box = document.getElementById('infoBox');
var shadow = document.getElementById('infoBoxShadow');
if (box) {
box.innerHTML=xmlhttp.responseText;
if (shadow) {
shadow.style.display = "block";
} else {
box.style.display = "block";
if (!is_msie() && !getInitParam("infobox_disable_overlay")) {
var overlay = document.getElementById("dialog_overlay");
if (overlay) {
overlay.style.display = "block";
}
}
var box = document.getElementById('infoBox');
var shadow = document.getElementById('infoBoxShadow');
if (box) {
box.innerHTML=xmlhttp.responseText;
if (shadow) {
shadow.style.display = "block";
} else {
box.style.display = "block";
}
}
notify("");
} catch (e) {
exception_error("infobox_callback", e);
}
notify("");
}
}