현재 버전

jquery json ajax

Uncaught SyntaxError: missing ) after argument list 에러메세지 질문드립니다.



function fn_saveRoadCrcmr(){
	fnCmmConfirm("저장하시겠습니까?", function() {
		$("form[name=rosidLndslMngmeVO]").ajaxSubmit( dataType : "json" ,url: '<c:url value="/road/roadCrcmrLndslMngmeMod.do"/>', success :function(){
			var rosidLndslMngmeId = '${rosidLndslMngmeVO.rosidLndslMngmeId }';
			var param, feature;
			var roadPntLayer = fnCmmGetVectorLayer('roadPntLayer');
			var roadPlgnLayer = fnCmmGetVectorLayer('roadPlgnLayer');
			param = { ROSID_LNDS : rosidLndslMngmeId };

			
			
			var callback = function(res){
				
				count = res.getFeaturesEventArgs.result.featureCount;
				
				var tableName = res.userParams.tableName;
				var geometry = null
				if(tableName == "TB_LDM_ROSID_PNT"){
					geometry = res.userParams.callbackOptions.roadPntLayerGeometry;
				}else{
					geometry = res.userParams.callbackOptions.roadPlgnLayerGeometry;
				}
				
				var rosidLnds = res.userParams.callbackOptions.rosidLnds;
				
				if(count == 0){
					var searchOption = {
							attrObjValues : {"ROSID_LNDS" : rosidLnds},
							typeCUD : "insert",
							tableName : tableName,
							geometry : geometry
					};
					IserverDataEditObject.onIserverDataCUD(searchOption,  function(){
							
					});
					
					return ;
				}
				var smid = res.getFeaturesEventArgs.result.features[0].data.SMID;
				
				var searchOption = {
						smid : smid,
						typeCUD : "update",
						tableName : tableName,
						geometry : geometry
				};
				IserverDataEditObject.onIserverDataCUD(searchOption,  function(){
						
				});
			};
			
			var searchOp = {
					callbackOptions : {roadPntLayerGeometry : null , roadPlgnLayerGeometry : null , rosidLnds : rosidLndslMngmeId },
					arrIds : null,
					attrFieldNm : null,
					attrValue : null,
					sql : "ROSID_LNDS = '"+rosidLndslMngmeId+"'",
					tableName : null
			};
			if(roadPntLayer.features.length!=0){
				feature = roadPntLayer.features[0];
				searchOp.tableName = "TB_LDM_ROSID_PNT";
				searchOp.callbackOptions.roadPntLayerGeometry = feature.geometry.clone();
				IserverDataSearchObject.onSearchIserverData(searchOp , callback);
			}
			if(roadPlgnLayer.features.length!=0){
				feature = roadPlgnLayer.features[0];
				searchOp.tableName = "TB_LDM_ROSID_PLGN";
				searchOp.callbackOptions.roadPlgnLayerGeometry = feature.geometry.clone();
				IserverDataSearchObject.onSearchIserverData(searchOp , callback);
			}

			fnCmmAlert("성공적으로 저장되었습니다.", function(){
				PageManager.addPage("<c:url value='/road/roadCrcmrLndslMngmeView.do?rosidLndslMngmeId='/>"+rosidLndslMngmeId, "상세");
			});
		});
	});
}

이게 에러가 나는 스크립트이고..



Uncaught SyntaxError: missing ) after argument list
    at eval (<anonymous>)
    at jquery-1.11.1.min.js:2
    at Function.globalEval (jquery-1.11.1.min.js:2)
    at m.fn.init.domManip (jquery-1.11.1.min.js:3)
    at m.fn.init.append (jquery-1.11.1.min.js:3)
    at Object.success (common.js:765)
    at j (jquery-1.11.1.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.1.min.js:2)
    at x (jquery-1.11.1.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.1.min.js:4)

이게 에러 내용입니다.

괄호 ) 가 빠진건가 아무리 찾아봐도.. 맞게 되어있는 것 같은데

구문 에러가 아닌 뭔가 다른 에러인지 궁금합니다..

 (해당 스크립트를 지우거나 주석하면, 에러났을때 화면 가운데 뺑글뺑글 도는게 사라지고.

 다시 활성화시키면 에러가 나는게 저 부분이 에러인건 확실한것같습니다..)


수정 이력

2020-11-20 16:06:51 에 아래 내용에서 변경 됨 #1


function fn_saveRoadCrcmr(){
	fnCmmConfirm("저장하시겠습니까?", function() {
		$("form[name=rosidLndslMngmeVO]").ajaxSubmit( dataType : "json" ,url: '<c:url value="/road/roadCrcmrLndslMngmeMod.do"/>', success :function(){
			var rosidLndslMngmeId = '${rosidLndslMngmeVO.rosidLndslMngmeId }';
			var param, feature;
			var roadPntLayer = fnCmmGetVectorLayer('roadPntLayer');
			var roadPlgnLayer = fnCmmGetVectorLayer('roadPlgnLayer');
			param = { ROSID_LNDS : rosidLndslMngmeId };

			
			
			var callback = function(res){
				
				count = res.getFeaturesEventArgs.result.featureCount;
				
				var tableName = res.userParams.tableName;
				var geometry = null
				if(tableName == "TB_LDM_ROSID_PNT"){
					geometry = res.userParams.callbackOptions.roadPntLayerGeometry;
				}else{
					geometry = res.userParams.callbackOptions.roadPlgnLayerGeometry;
				}
				
				var rosidLnds = res.userParams.callbackOptions.rosidLnds;
				
				if(count == 0){
					var searchOption = {
							attrObjValues : {"ROSID_LNDS" : rosidLnds},
							typeCUD : "insert",
							tableName : tableName,
							geometry : geometry
					};
					IserverDataEditObject.onIserverDataCUD(searchOption,  function(){
							
					});
					
					return ;
				}
				var smid = res.getFeaturesEventArgs.result.features[0].data.SMID;
				
				var searchOption = {
						smid : smid,
						typeCUD : "update",
						tableName : tableName,
						geometry : geometry
				};
				IserverDataEditObject.onIserverDataCUD(searchOption,  function(){
						
				});
			};
			
			var searchOp = {
					callbackOptions : {roadPntLayerGeometry : null , roadPlgnLayerGeometry : null , rosidLnds : rosidLndslMngmeId },
					arrIds : null,
					attrFieldNm : null,
					attrValue : null,
					sql : "ROSID_LNDS = '"+rosidLndslMngmeId+"'",
					tableName : null
			};
			if(roadPntLayer.features.length!=0){
				feature = roadPntLayer.features[0];
				searchOp.tableName = "TB_LDM_ROSID_PNT";
				searchOp.callbackOptions.roadPntLayerGeometry = feature.geometry.clone();
				IserverDataSearchObject.onSearchIserverData(searchOp , callback);
			}
			if(roadPlgnLayer.features.length!=0){
				feature = roadPlgnLayer.features[0];
				searchOp.tableName = "TB_LDM_ROSID_PLGN";
				searchOp.callbackOptions.roadPlgnLayerGeometry = feature.geometry.clone();
				IserverDataSearchObject.onSearchIserverData(searchOp , callback);
			}

			fnCmmAlert("성공적으로 저장되었습니다.", function(){
				PageManager.addPage("<c:url value='/road/roadCrcmrLndslMngmeView.do?rosidLndslMngmeId='/>"+rosidLndslMngmeId, "상세");
			});
		});
	});
}

이게 에러가 나는 스크립트이고..



Uncaught SyntaxError: missing ) after argument list
    at eval (<anonymous>)
    at jquery-1.11.1.min.js:2
    at Function.globalEval (jquery-1.11.1.min.js:2)
    at m.fn.init.domManip (jquery-1.11.1.min.js:3)
    at m.fn.init.append (jquery-1.11.1.min.js:3)
    at Object.success (common.js:765)
    at j (jquery-1.11.1.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.1.min.js:2)
    at x (jquery-1.11.1.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.1.min.js:4)

이게 에러 내용입니다.

괄호 ) 가 빠진건가 아무리 찾아봐도.. 맞게 되어있는 것 같은데

구문 에러가 아닌 뭔가 다른 에러인지 궁금합니다..