apply patch from Scott Edwards to show mason errors received from XMLHTTP requests
[freeside.git] / httemplate / elements / xmlhttp.html
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");
+                }
+              }
             }
         }