From aa8716da38a92a73799c5668bf0c51656af49646 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 14 Jun 2007 07:34:35 +0100 Subject: [PATCH] infobox_callback: add exception handler --- functions.js | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/functions.js b/functions.js index 7b7253d9..89e3c261 100644 --- a/functions.js +++ b/functions.js @@ -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(""); } } -- 2.39.5