Files
KON/include/footer_prev_val.asp
2026-08-07 12:53:18 +09:00

121 lines
3.7 KiB
Plaintext

<%'//-- 2022-10-06 hwkim
'// QID 말고 variable name으로 보여주어야 한다.
dim PREV_IDKEY : PREV_IDKEY = request("IDKEY")
dim PREV_SURVEYTYPE : PREV_SURVEYTYPE = request("SURVEYTYPE")
if( PREV_SURVEYTYPE = "TEST" )then
%>
<script src="/js/jquery-ui/jquery-ui.min.js" ></script>
<style>
.area {
position: relative;
color: #0F0;
font-weight: bold;
/* you may want to set the width/height here as well*/
}
.fixed {
position: absolute;
top: 500px;
left: 500px;
/*border: 1px solid black;*/
padding: 5px;
z-index: 100; /* Thanks Diego for pointing out the typo here */
/*background-color: red;*/
display: none;
}
</style>
<!-- Modal -->
<div class="fixed " id="Modal_prev_val" tabindex="-1" style="width:450px;display:;" >
<div class="modal-dialog" >
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="AlertModalLabel">데이터 목록</h5>
<button type="button" class="prev_close" >
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="container" id="prev_answer_data" style="padding:15px;" >
<div class="row" >
<div >11</div>
<div >12</div>
<div >13</div>
<div >14</div>
</div>
</div>
<div class="card">
<button type="button" class="btn btn-secondary prev_close" >Close</button>
</div>
</div>
</div>
</div>
<script>
function alertModalPrevVal(msg){
$("#prev_answer_data").html("");
$("#prev_answer_data").html(msg);
$("#Modal_prev_val").show();
//$("#Modal_prev_val").modal("show");
}
</script>
<script>
var ajaxurl_2 = "/include/footer_prev_val_ajax.asp"
$(document).ready(function(){
$(".question-button-box").append("<button type='button' id='answer_prev_data' class='btn btn-light btn-sm m-1 border shadow-sm'>Answer Data View</button>");
$("#answer_prev_data").on("click", function(){
var prev_val_arr = ajax_returnData(ajaxurl_2, { "COMMAND": "PREV_VAL", "CODE": kon.survey.PKEY, "IDKEY": kon.survey.IDKEY }) /* 데이터 */
console.log(prev_val_arr);
$("#prev_answer_data").html("");
var data_val_prev = ""
prev_val_arr.forEach(function (v, i) {
data_val_prev = "<div class='row' >"
data_val_prev += "<div class='col-md-1 ' >"+ v.dv_key +"</div>"
data_val_prev += "<div class='col-md-3 ml-auto' >"+ v.VNAME +"</div>"
data_val_prev += "<div class='col-md-1 ml-auto' >"+ v.RESPONSE +"</div>"
data_val_prev += "<div class='col-md-2 ml-auto' >"+ v.QTYPE +"</div>"
data_val_prev += "</div>"
console.log(v.VNAME);
$("#prev_answer_data").append(data_val_prev);
});
//-- 위치
var offset = $("#answer_prev_data").offset();
//-- 버튼 옆에서 노출
//-- $("#Modal_prev_val").animate({top : offset.top - 100,left : offset.left + 150}, 400);
//-- 상단에 노출
$("#Modal_prev_val").animate({top : 100,left : 20}, 400);
$("#Modal_prev_val").toggle();
});
$("#Modal_prev_val").draggable();
$(".prev_close").on("click", function(){
$("#Modal_prev_val").hide();
});
});
</script>
<%
end if
%>