쿠폰관리 페이지의 상품검색 기능

쿠폰관리 페이지의 상품검색 기능

QA

쿠폰관리 페이지의 상품검색 기능

답변 1

본문

관리자 페이지의 쿠폰관리 페이지에 있는 상품검색 기능을 게시판에 넣을려고 합니다.

그런데 write.skin.php 파일에 아래의 스크립트와 코드를 그대로 붙혀 넣어도 팝업창이 열리지가 않네요.

 

    <tr id="tr_cp_target">
        <th scope="row"><label for="cp_target">상품검색</label></th>
        <td>
           <input type="text" name="cp_target" value="<?php echo stripslashes($cp['cp_target']); ?>" id="cp_target" required class="required frm_input">
           <button type="button" id="sch_target" class="btn_frmline">상품검색</button>
        </td>
    </tr>

 

스크립트

$(function() {

    $("#sch_target").click(function() {
        var cp_method = $("#cp_method").val();
        var opt = "left=50,top=50,width=520,height=600,scrollbars=1";
        var url = "./item_popup.php?sch_target=";

        if(cp_method == "0") {
            window.open(url+"0", "win_target", opt);
        } else if(cp_method == "1") {
            window.open(url+"1", "win_target", opt);
        } else {
            return false;
        }
    });
});

 

뭐가 잘못되었는지 알 수 있을까요? 

이 질문에 댓글 쓰기 :

답변 1

cp_method 라는 id를 가지는 input 폼을 만들어서 거기에 0 또는 1값이 있어야 팝업창이 오픈되는 스크립트입니다. 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 12
© SIRSOFT
현재 페이지 제일 처음으로