<%
/**
 * <pre>
 * @Class Name : listCodes.jsp
 * 
 * @Description : 묻고답하기 목록을 조회한다.
 * 
 * 
 * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
 *
 * </pre>
 *
 * @ ------------    --------    ---------------------------
 * @ 수정일                     수정자             수정내용
 * @ ------------    --------    ---------------------------
 * @ 2021. 8. 5.    KNKIM       최초 생성
 *
 * 
 * @author 이씨플라자 * DIGITALSHIP KNKIM
 * @since 2021. 8. 5.
 * @version 1.0
 *
 */
 %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>

<c:set var="pageTitle">공통코드</c:set>

<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>

<script>

$( document ).ready(function() {

    
}); // document ready

function popSubmit() {
	var dataList = $("#codeForm").serialize();
	//alert("popSubmit : " + dataList);
	var url = $("#codeForm").attr('action');
	//alert("action   : " + url);
	
    $.ajax({
        type: "post",
        url: url,
        data: dataList
    }).done(function(response){
        $("#myPop").html(response);
    });
	
}
</script>
</head>

<body>

<h1>${pageTitle }</h1>

메시지 Popup : ${message} 
&nbsp;<br/>

<form name="codeForm" id="codeForm"  
      action="${pageContext.request.contextPath}/code/listCodesPopup.do" 
      method="post"> 
	
	<!-- 검색조건 -->
	<input type="text" name="lCodeId" id="lCodeId" title="검색어" value="${lCodeId }" size="35" maxlength="50" /> 
	
	<input type="text" name="title" id="title" title="검색어" value="ThisIsTitleVal" size="35" maxlength="50" />
	<input type="text" name="content" id="content" value="ThisIsCCCCContent Val" size="35" maxlength="50" />
	
	<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" onclick="popSubmit()" />
	PAGE_SIZE_OPTION
	     
</form>

<table>
<tr>
    <th>코드2222</th>
    <th>코드명22222222</th>
</tr>
<c:forEach var="codeItem" items="${resultList }" varStatus="status">
    <tr>
	    <td><c:out value="${codeItem.sCodeId }" /></td>
	    <td><c:out value="${codeItem.sCodeNm }" /></td>
    </tr>
</c:forEach>
</table>

<a href="javascript:void(0)" onclick="gotoInPop('${pageContext.request.contextPath}/inform/selectNCultureOperationInfo.do')">팝업내에서 링크이동</a>
</body>
</html>
