includes/clientside/static/acl.js
changeset 651 ce9d78d7251d
parent 586 234ddd896555
child 677 2a263b598a2b
--- a/includes/clientside/static/acl.js	Sun Jul 20 13:32:04 2008 -0400
+++ b/includes/clientside/static/acl.js	Tue Jul 22 14:49:18 2008 -0500
@@ -31,7 +31,7 @@
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         var response = String(ajax.responseText + '');
-        if ( response.substr(0, 1) != '{' )
+        if ( !check_json_response(response) )
         {
           handle_invalid_json(ajax.responseText);
           return false;
@@ -66,7 +66,7 @@
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         var response = String(ajax.responseText + '');
-        if ( response.substr(0, 1) != '{' )
+        if ( !check_json_response(response) )
         {
           handle_invalid_json(ajax.responseText);
           return false;
@@ -388,7 +388,7 @@
       if ( ajax.readyState == 4 && ajax.status == 200 )
       {
         var response = String(ajax.responseText + '');
-        if ( response.substr(0, 1) != '{' )
+        if ( !check_json_response(response) )
         {
           handle_invalid_json(ajax.responseText);
           return false;