Explorar o código

[진료관리] 설정 ajax 에러 처리 추가.

sjpark %!s(int64=4) %!d(string=hai) anos
pai
achega
4c0476934a
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  1. 8 3
      src/main/webapp/WEB-INF/jsp/clinic/config.jsp

+ 8 - 3
src/main/webapp/WEB-INF/jsp/clinic/config.jsp

@@ -70,7 +70,10 @@ function saveDisplayItem() {
         method   : "PATCH",
         dataType : "json",
         success  : function( datas ){
-          console.log("datas");
+          if (datas.code !== "00")
+          {
+            alert("ERROR!\n" + datas.message);
+          }
         },
         error : ajaxErrorHandler
     })
@@ -113,8 +116,10 @@ function saveAlarmValue() {
         method   : "PATCH",
         dataType : "json",
         success  : function( datas ){
-
-						
+          if (datas.code !== "00")
+          {
+            alert("ERROR!\n" + datas.message);
+          }	
         },
         error : ajaxErrorHandler
     })