[freeside-devel] [patch] xmlhttp.html - print mason errors to a
new window while in xmlhttp/javascript land.
ivan
ivan at 420.am
Fri Nov 4 03:44:12 PST 2005
thanks, applied
On Tue, Oct 25, 2005 at 10:57:10PM -0600, Scott Edwards wrote:
> Ivan, as I discussed earlier, I'm making the patch available to reveal
> mason errors that can show up while sourcing data meant for
> javascript. (JSON/xmlhttp/ajax etc).
>
> Enjoy,
>
>
> Scott Edwards
> --
> Daxal Communications - http://www.daxal.com
> Index: xmlhttp.html
> ===================================================================
> RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/xmlhttp.html,v
> retrieving revision 1.3
> diff -u -r1.3 xmlhttp.html
> --- xmlhttp.html 24 Oct 2005 11:56:35 -0000 1.3
> +++ xmlhttp.html 26 Oct 2005 04:51:22 -0000
> @@ -76,6 +76,17 @@
> var data = xmlhttp.responseText;
> //alert('received response: ' + data);
> a[a.length-1](data);
> + if (data.indexOf("<b>System error</b>",0)) {
> + var w;
> + if (w=window.open("about:blank")) {
> + w.document.write(data);
> + } else {
> + // popup blocking?
> + // I'll add some regex black magic to recover a little of the error
> + // and pass in the alert dialog - sometime later... - Scott Edwards
> + alert('Huston, we have a problem (disable popup blocking to see)');
> + }
> + }
> }
> }
> _______________________________________________
> freeside-devel mailing list
> freeside-devel at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-devel
--
_ivan
More information about the freeside-devel
mailing list