I noticed that AJAX errors are being printed on to the document directly....

jscript_framework.php
Code:
         document.open();
         document.write(responseHtml);
         document.close();
Should probaby change that behaviour to
Code:
         console.log(responseHtml);
Haven't got the time to go through the system, but it seems to have something to do with showing "raw" html error messages?

But if there are other (non intended) errors, just printing the output brakes layout.