equal
deleted
inserted
replaced
125 { |
125 { |
126 if ( ajax.readyState == 4 && ajax.status == 200 ) |
126 if ( ajax.readyState == 4 && ajax.status == 200 ) |
127 { |
127 { |
128 theme_list.innerHTML = ''; |
128 theme_list.innerHTML = ''; |
129 var response = String(ajax.responseText + ''); |
129 var response = String(ajax.responseText + ''); |
130 if ( response.substr(0, 1) != '{' ) |
130 if ( !check_json_response(response) ) |
131 { |
131 { |
132 alert(response); |
132 alert(response); |
133 return false; |
133 return false; |
134 } |
134 } |
135 response = parseJSON(response); |
135 response = parseJSON(response); |
493 f_useradd.disabled = null; |
493 f_useradd.disabled = null; |
494 img.parentNode.removeChild(img); |
494 img.parentNode.removeChild(img); |
495 |
495 |
496 // process response |
496 // process response |
497 var response = String(ajax.responseText + ''); |
497 var response = String(ajax.responseText + ''); |
498 if ( response.substr(0, 1) != '{' ) |
498 if ( !check_json_response(response) ) |
499 { |
499 { |
500 alert(response); |
500 alert(response); |
501 return false; |
501 return false; |
502 } |
502 } |
503 response = parseJSON(response); |
503 response = parseJSON(response); |
607 { |
607 { |
608 if ( ajax.readyState == 4 && ajax.status == 200 ) |
608 if ( ajax.readyState == 4 && ajax.status == 200 ) |
609 { |
609 { |
610 // process response |
610 // process response |
611 var response = String(ajax.responseText + ''); |
611 var response = String(ajax.responseText + ''); |
612 if ( response.substr(0, 1) != '{' ) |
612 if ( !check_json_response(response) ) |
613 { |
613 { |
614 // For this we actually *expect* an HTML response. |
614 // For this we actually *expect* an HTML response. |
615 parent.innerHTML = response; |
615 parent.innerHTML = response; |
616 return false; |
616 return false; |
617 } |
617 } |
641 { |
641 { |
642 if ( ajax.readyState == 4 && ajax.status == 200 ) |
642 if ( ajax.readyState == 4 && ajax.status == 200 ) |
643 { |
643 { |
644 // process response |
644 // process response |
645 var response = String(ajax.responseText + ''); |
645 var response = String(ajax.responseText + ''); |
646 if ( response.substr(0, 1) != '{' ) |
646 if ( !check_json_response(response) ) |
647 { |
647 { |
648 // For this we actually *expect* an HTML response. |
648 // For this we actually *expect* an HTML response. |
649 parent.innerHTML = response; |
649 parent.innerHTML = response; |
650 return false; |
650 return false; |
651 } |
651 } |