apply patch from Scott Edwards to show mason errors received from XMLHTTP requests
authorivan <ivan>
Fri, 4 Nov 2005 11:31:19 +0000 (11:31 +0000)
committerivan <ivan>
Fri, 4 Nov 2005 11:31:19 +0000 (11:31 +0000)
CREDITS
httemplate/elements/xmlhttp.html

diff --git a/CREDITS b/CREDITS
index bec9702..930b4f3 100644 (file)
--- 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 <supadupa@gmail.com> contributed magic for XMLHTTP error
+handling, and other patches.
+
 Everything else is my (Ivan Kohler <ivan@420.am>) fault.
 
index 1199b69..4f4c5f5 100644 (file)
               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");
+                }
+              }
             }
         }