From: ivan Date: Fri, 4 Nov 2005 11:31:19 +0000 (+0000) Subject: apply patch from Scott Edwards to show mason errors received from XMLHTTP requests X-Git-Tag: BEFORE_FINAL_MASONIZE~327 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=92b2405b299bc60bc8bf6e594f7bd3f51645e124 apply patch from Scott Edwards to show mason errors received from XMLHTTP requests --- diff --git a/CREDITS b/CREDITS index bec9702a5..930b4f351 100644 --- a/CREDITS +++ b/CREDITS @@ -154,5 +154,8 @@ terms of the BSD license. (c) copyright 2005 modernmethod, inc Perl backend version (c) copyright 2005 Nathan Schmidt +Scott Edwards contributed magic for XMLHTTP error +handling, and other patches. + Everything else is my (Ivan Kohler ) 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("System error") > -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"); + } + } } }