includes/clientside/static/theme-manager.js
changeset 651 ce9d78d7251d
parent 465 fe8b8c9b54e8
child 658 49dee7f374bf
--- a/includes/clientside/static/theme-manager.js	Sun Jul 20 13:32:04 2008 -0400
+++ b/includes/clientside/static/theme-manager.js	Tue Jul 22 14:49:18 2008 -0500
@@ -127,7 +127,7 @@
           {
             theme_list.innerHTML = '';
             var response = String(ajax.responseText + '');
-            if ( response.substr(0, 1) != '{' )
+            if ( !check_json_response(response) )
             {
               alert(response);
               return false;
@@ -495,7 +495,7 @@
         
         // process response
         var response = String(ajax.responseText + '');
-        if ( response.substr(0, 1) != '{' )
+        if ( !check_json_response(response) )
         {
           alert(response);
           return false;
@@ -609,7 +609,7 @@
       {
         // process response
         var response = String(ajax.responseText + '');
-        if ( response.substr(0, 1) != '{' )
+        if ( !check_json_response(response) )
         {
           // For this we actually *expect* an HTML response.
           parent.innerHTML = response;
@@ -643,7 +643,7 @@
       {
         // process response
         var response = String(ajax.responseText + '');
-        if ( response.substr(0, 1) != '{' )
+        if ( !check_json_response(response) )
         {
           // For this we actually *expect* an HTML response.
           parent.innerHTML = response;