$.ajax({ url: '/uploadAjax', data: formData, dataType: 'text', processData: false, contentType: false, type: 'POST', success: function(data) { } ); 위의 processData, contentType을 추가해주면 formData가 전송된다 --- 2019.11.05 추가 --위 방법으로 했을떄 안되면contentType 을 제거하고 processData만 넣어서 보냄
let positionList;let dutyList;$.ajax({url : contextPath + "/empInfoManage/getPositionDuty",type : "post",dataType : "json",data : {compSeq: compSeq},success : function(response) {$(response.data).each( (index, item) => {if( item.positionSeq.charAt(0) == 'G'){positionList = response.data.slice(0, index - 1);dutyList = response.data.slice(index);return false;}});},error : function(xhr, status, e) ..
let questionBox = function(title, message){let def = $.Deferred();$("#dialog-message").attr({title: title});$("#dialog-message p").text(message);$("#dialog-message").dialog({modal: true,buttons: {"예": function(){$(this).dialog("close");def.resolve("Yes");},"아니요": function(){$(this).dialog("close");def.resolve("No");}},});return def.promise();};위 소스를 이용하여 Yes, No값을 넣어 promise객체로 리턴하고 그것을 then으로 받..
JQuery UI를 사용하기위해 위 2개의 파일이 필요 위 html 코드를 html부분 아무데나 넣어둔다 let messageBox = function(title, message){$("#dialog-message").attr({title: title});$("#dialog-message p").text(message);$("#dialog-message").dialog({modal: true,buttons: {"확인": function(){$(this).dialog("close");}},});};위 함수를 호출하면 dialog가 생성된다ex) messageBox("알림", "테스트입니다");
let table =$('#statusTable').dataTable({ pageLength: 10, bPaginate: true, info:false, pagingType:"numbers", bLengthChange: true, lengthMenu : [ [ 3, 5, 10, -1 ], [ 3, 5, 10, "All" ] ], bAutoWidth: false, processing: true, ordering: true, serverSide: false, searching: false, scrollY: false, ajax : { "url": contextPath + "/empInfoManage/search", "type":"POST", data: { compName: compNames, workStat..
let table =$('#statusTable').dataTable({ pageLength: 10, bPaginate: true, info:false, pagingType:"numbers", bLengthChange: true, lengthMenu : [ [ 3, 5, 10, -1 ], [ 3, 5, 10, "All" ] ], bAutoWidth: false, processing: true, ordering: true, serverSide: false, searching: false, scrollY: false, ajax : { "url": contextPath + "/empInfoManage/search", "type":"POST", data: { compName: compNames, workStat..