diff options
-rw-r--r-- | CREDITS | 3 | ||||
-rw-r--r-- | httemplate/elements/xmlhttp.html | 9 |
2 files changed, 12 insertions, 0 deletions
@@ -154,5 +154,8 @@ terms of the BSD license. (c) copyright 2005 modernmethod, inc Perl backend version (c) copyright 2005 Nathan Schmidt +Scott Edwards <supadupa@gmail.com> contributed magic for XMLHTTP error +handling, and other patches. + Everything else is my (Ivan Kohler <ivan@420.am>) fault. diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index 1199b69be..4f4c5f53b 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -76,6 +76,15 @@ var data = xmlhttp.responseText; //alert('received response: ' + data); a[a.length-1](data); + if ( data.indexOf("<b>System error</b>") > -1 ) { + var w; + if ( w = window.open("about:blank") _ } + w.document.write(data); + } else { + // popup blocking? should use an overlib popup instead + alert("Error popup disabled; try disabling popup blocking to see"); + } + } } } |