summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-20 15:38:27 +0300
committerAndrew Dolgov <[email protected]>2010-11-20 15:38:27 +0300
commit0a8365937187a202c87e98a0d91904094f22a2be (patch)
treeaacb0c02480f80e2bee02ef9bbfb1cc197d139f3 /functions.js
parent33f31dfdfc2ca303c55c1f8b6ef7d002053228a1 (diff)
infobox_callback2: fail on invalid dialog xml
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/functions.js b/functions.js
index e303c4049..4f1f37553 100644
--- a/functions.js
+++ b/functions.js
@@ -466,20 +466,15 @@ function infobox_callback2(transport) {
var content;
var dtitle = "Dialog";
- if (transport.responseXML) {
- var dlg = transport.responseXML.getElementsByTagName("dlg")[0];
-
- var title = transport.responseXML.getElementsByTagName("title")[0];
- if (title)
- title = title.firstChild.nodeValue;
+ var dlg = transport.responseXML.getElementsByTagName("dlg")[0];
- var content = transport.responseXML.getElementsByTagName("content")[0];
-
- content = content.firstChild.nodeValue;
+ var title = transport.responseXML.getElementsByTagName("title")[0];
+ if (title)
+ title = title.firstChild.nodeValue;
- } else {
- content = transport.responseText;
- }
+ var content = transport.responseXML.getElementsByTagName("content")[0];
+
+ content = content.firstChild.nodeValue;
if (!dialog) {
dialog = new dijit.Dialog({