재질문5번쩨입니다. 다중셀렉트 질문입니다.

재질문5번쩨입니다. 다중셀렉트 질문입니다.

QA

재질문5번쩨입니다. 다중셀렉트 질문입니다.

본문

- write.skin.php -
 

아래 내용은 검색과 고수님들께 질문으로 만든 , DB 연동한 다중 셀렉트입니다.

다른 테이블값을 가져와서 다중셀렉트로 구성하는 겁니다.
$menu1 의 셀렉트 값이 있으면 $menu2 의 셀렉트가 열리고,...최종  $menu4  까지 열리는데
$menu1 의 값에 따라 나머지도 바뀌죠. 문제는....

DB에 저장은 잘 되는데, 수정 하려면 초기화 됩니다. ㅜㅜ;

sir 게시판을 거의 다 뒤져 봤는데.. 원하는 답은 아직 나타나질 않았고..,
고수님들은 모두 휴가 가셨는지, 조언이 없으시네요..

도와주세요.. ㅜㅜ 반드시 해결해야 해서 시간이 얼마나 걸리든지 계속 찾아보렵니다.
고수님들 도와주세요~~ 제발~~~~~~~~~~~~~

 

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 날자용 Datepicker
include_once(G5_PLUGIN_PATH.'/bootstrap-datepicker/datepicker.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$write_skin_url.'/apply.css" media="screen">', 0);
//다음 주소 js
//add_javascript(G5_POSTCODE_JS, 0);

// 추가폼값을 전부 글내용(wr_content)에 담음
$wr_data = apms_unpack($write['wr_content']);

// 필요 배열값
   $pay_arr = array('카드결재', '무통장입금');

// 회원정보에 입력된 개인정보 자동입력
if ($w == '' && $member['mb_id']) {
  
    $write['wr_1'] = $member['mb_name'];
    $write['wr_2'] = $member['mb_hp'];
    $write['wr_3'] = $member['mb_id'];
    $write['wr_4'] = $member['mb_nick'];
    $write['wr_5'] = $member['mb_email'];
    $write['wr_6'] = $member['mb_business_no'];
    $write['wr_7'] = $member['mb_3'];
    $write['wr_8'] = $member['mb_addr1'];
    $write['wr_9'] = $member['mb_addr2'];
}
?>
<?php
    $today = date("Y-m-d");
    $sql = " SELECT wr_7, wr_5, wr_subject, wr_9 FROM g5_write_exam_location  GROUP BY wr_7, wr_5, wr_subject, wr_9 ";
    $result = sql_query($sql);
    $wr_7 = $menu1; $wr_5 = $menu2; $wr_subject = $menu3; $wr_9 = $menu4;    
    for ($i=0; $row = sql_fetch_array($result); $i++) {
      $nm[$i] = $row['wr_7'].'|1|'.$row['wr_5'].'|2|'.$row['wr_subject'].'|3|'.$row['wr_9'].'|4|';    
    }
  ?>
<script src="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
<script type="text/javascript">
function getCataAllId(cmd) {
    cmd = eval(cmd);
    cmd2 = cmd + 1;
    initCataID(cmd);
    var ch = "";
    for (var idx = 1; idx < cmd2; idx++) {
        ch = ch + eval("document.fwrite.menu" + idx + ".value") + "|" + idx + "|";
    }
    var v = 0;
    var temp = "";
    var tempv = "";
    var arg = "";
    for (var m = 0; m < menuArr.length; m++) {
        arg = menuArr[m].substring(menuArr[m].indexOf("|" + cmd + "|") + 3, menuArr[m].indexOf("|" + cmd2 + "|"));
        temp = menuArr[m].substring(0, menuArr[m].indexOf("|" + cmd + "|") + 3);
        if (temp == ch && tempv != arg) {
            v++;
            eval("document.fwrite.menu" + cmd2 + ".length = document.fwrite.menu" + cmd2 + ".length + 1");
            eval("document.fwrite.menu" + cmd2 + ".options[" + v + "].value = arg ");
            eval("document.fwrite.menu" + cmd2 + ".options[" + v + "].text  = arg ");
        }
        if (temp != ch) {
            tempv = "";
        } else {
            tempv = menuArr[m].substring(menuArr[m].indexOf("|" + cmd + "|") + 3, menuArr[m].indexOf("|" + cmd2 + "|"));
        }
    }
}
function initCataID(cmd) {
    cmd = eval(cmd);
    if (cmd == 1) {
        document.fwrite.menu2.length = 1;
        document.fwrite.menu3.length = 1;
        document.fwrite.menu4.length = 1;
        document.fwrite.menu2.selectedIndex = 0;
        document.fwrite.menu3.selectedIndex = 0;
        document.fwrite.menu4.selectedIndex = 0;
    }
    if (cmd == 2) {
        document.fwrite.menu3.length = 1;
        document.fwrite.menu4.length = 1;
        document.fwrite.menu3.selectedIndex = 0;
        document.fwrite.menu4.selectedIndex = 0;
    }
    if (cmd == 3) {
        document.fwrite.menu4.length = 1;
        document.fwrite.menu4.selectedIndex = 0;
    }
}
</script>
<?php // 작성자의 정보 호출
$mb = get_member($view['mb_id']);
?>
<style type="text/css">
.modal-dialog-centered { display: grid; align-items: center; min-height: calc(75% - 0rem); }
.form-control-2 { line-height: 1.42857143; background-image: none; border: 0px solid #fff; border-radius: 0px; }
.form-control-v { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; background-color: #ffe3ea; background-image: none; border: 0px solid #fff; border-radius: 0px; }
.form-control-v[disabled], .form-control-v[readonly], fieldset[disabled] .form-control-v { cursor: not-allowed; background-color: #transparent; opacity: 1; }
</style>

<!-- 게시물 작성/수정 시작 { -->
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" role="form" class="form">
    <input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
    <input type="hidden" name="w" value="<?php echo $w ?>">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
    <input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
    <input type="hidden" name="sca" value="<?php echo $sca ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
    <input type="hidden" name="stx" value="<?php echo $stx ?>">
    <input type="hidden" name="spt" value="<?php echo $spt ?>">
    <input type="hidden" name="sst" value="<?php echo $sst ?>">
    <input type="hidden" name="sod" value="<?php echo $sod ?>">
    <input type="hidden" name="page" value="<?php echo $page ?>">
    <input type="hidden" name="wr_content" value=" ">
    <input type="hidden" name="wr_subject" value="<?php echo $member['mb_name'] ?>">
    <div class="clearfix" style="height: 38px;"></div>
    <div class="form-title-thin">
        <h4 class="info-box-g">기본 정보</h4>
    </div>
    <div class="clearfix" style="height: 10px;"></div>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top text-info">수험번호<strong class="sound_only">필수</strong></div>
        <div class="col-md-10 col-xs-8 t-sub border-top">
    <?php
        if ($w == '') {
        // gen order no
        $now = date("Y", G5_SERVER_TIME).'-'.date("m", G5_SERVER_TIME).'-'.'A-'; //오늘의 날짜 년월일시분초 
        $rand = strtoupper(substr(uniqid(sha1(time())),0,4)) ; //임의의난수발생 앞6자리       
        $jubsu_num = $now . $rand ;  
        $wr_data["examination_no"] = $jubsu_num;
        }
      ?>
            <input type="hidden" name="wr_data[examination_no]" value="<?php echo $wr_data['examination_no'];?>" class="">
            <?php echo $wr_data['examination_no'];?>
        </div>
    </div>
    <?php if ( $member['mb_level'] == 3 ) { //(사업자 정보수정) ?>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top ">회사명</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_1" value="<?php echo $write['wr_1'];?>" ><?php echo $write['wr_1'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">아이디</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_3" value="<?php echo $write['wr_3'];?>" ><?php echo $write['wr_3'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">이메일</div>
        <div class="col-md-4 col-xs-8 t-sub border-top ">
            <input type="hidden" class="form-control-2" name="wr_5" value="<?php echo $write['wr_5'];?>" ><?php echo $write['wr_5'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">휴대폰</div>
        <div class="col-md-4 col-xs-8 t-sub border-top ">
            <input type="hidden" class="form-control-2" name="wr_2" value="<?php echo $write['wr_2'];?>" ><?php echo $write['wr_2'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">영문회사명</div>
        <div class="col-md-4 col-xs-8 t-sub border-top  text-uppercase">
            <input type="hidden" class="form-control-2" name="wr_4" value="<?php echo $write['wr_4'];?>" ><?php echo $write['wr_4'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">사업자번호</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_6" value="<?php echo $write['wr_6'];?>" ><?php echo $write['wr_6'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top border-bottom">주소</div>
        <div class="col-md-10 col-xs-8 t-sub border-top border-bottom">
            <input type="hidden" class="form-control-2" name="wr_8" value="<?php echo $write['wr_8'];?>" >
            <input type="hidden" class="form-control-2" name="wr_9" value="<?php echo $write['wr_9'];?>" ><?php echo $write['wr_8'];?> (<?php echo $write['wr_9'];?>)            
        </div>
    </div>
    <?php } elseif ( $member['mb_level'] == 2 ) { /////////////////////////////////////// (개인정보출력) ?>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top ">성명</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_1" value="<?php echo $write['wr_1'];?>" ><?php echo $write['wr_1'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">아이디</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_3" value="<?php echo $write['wr_3'];?>" ><?php echo $write['wr_3'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">이메일</div>
        <div class="col-md-4 col-xs-8 t-sub border-top ">
            <input type="hidden" class="form-control-2" name="wr_5" value="<?php echo $write['wr_5'];?>" ><?php echo $write['wr_5'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">휴대폰</div>
        <div class="col-md-4 col-xs-8 t-sub border-top ">
            <input type="hidden" class="form-control-2" name="wr_2" value="<?php echo $write['wr_2'];?>" ><?php echo $write['wr_2'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">영문성명</div>
        <div class="col-md-4 col-xs-8 t-sub border-top  text-uppercase">
            <input type="hidden" class="form-control-2" name="wr_4" value="<?php echo $write['wr_4'];?>" ><?php echo $write['wr_4'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">생년월일</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_7" value="<?php echo $write['wr_7'];?>" ><?php echo $write['wr_7'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top border-bottom">주소</div>
        <div class="col-md-10 col-xs-8 t-sub border-top border-bottom">
            <input type="hidden" class="form-control-2" name="wr_8" value="<?php echo $write['wr_8'];?>" >
            <input type="hidden" class="form-control-2" name="wr_9" value="<?php echo $write['wr_9'];?>" ><?php echo $write['wr_8'];?> (<?php echo $write['wr_9'];?>)
        </div>
    </div>
    <?php } elseif ( $member['mb_level'] == 10 ) { /////////////////////////////////////// (개인정보출력) ?>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top ">기업명/성명</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_1" value="<?php echo $write['wr_1'];?>" ><?php echo $write['wr_1'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">아이디</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_3" value="<?php echo $write['wr_3'];?>" ><?php echo $write['wr_3'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">이메일</div>
        <div class="col-md-4 col-xs-8 t-sub border-top ">
            <input type="hidden" class="form-control-2" name="wr_5" value="<?php echo $write['wr_5'];?>" ><?php echo $write['wr_5'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">휴대폰</div>
        <div class="col-md-4 col-xs-8 t-sub border-top ">
            <input type="hidden" class="form-control-2" name="wr_2" value="<?php echo $write['wr_2'];?>" ><?php echo $write['wr_2'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">영문명</div>
        <div class="col-md-4 col-xs-8 t-sub border-top  text-uppercase">
            <input type="hidden" class="form-control-2" name="wr_4" value="<?php echo $write['wr_4'];?>" ><?php echo $write['wr_4'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">사업자/생년월일</div>
        <div class="col-md-4 col-xs-8 t-sub border-top">
            <input type="hidden" class="form-control-2" name="wr_7" value="<?php echo $write['wr_7'];?>" >
            <input type="hidden" class="form-control-2" name="wr_6" value="<?php echo $write['wr_6'];?>" ><?php echo $write['wr_7'];?> / <?php echo $write['wr_6'];?>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top border-bottom">주소</div>
        <div class="col-md-10 col-xs-8 t-sub border-top border-bottom">
            <input type="hidden" class="form-control-2" name="wr_8" value="<?php echo $write['wr_8'];?>" >
            <input type="hidden" class="form-control-2" name="wr_9" value="<?php echo $write['wr_9'];?>" ><?php echo $write['wr_8'];?> (<?php echo $write['wr_9'];?>)
        </div>
    </div>
    <?php } ?>
    
    <div class="clearfix" style="height: 30px;"></div>
    <div class="form-title-thin">
        <h4 class="info-box-g">응시유형</h4>
    </div>
    <div class="clearfix" style="height: 10px;"></div>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top">자격증종류</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top">
            <?php 
             $wr_data['license_lot'] = $menu1;
             $wr_data['exam_lot'] = $menu2;
             $wr_data['exam_local'] = $menu2;
             $wr_data['exam_day'] = $menu4;
            ?>
            <select name='wr_data[license_lot]' id='menu1' OnChange='javascript:getCataAllId(1)' required class="caaok-select">
                <option value='<?=$wr_data[' license_lot']?>'
                    <?=($wr_data['license_lot'] =='$wr_data[license_lot]' )? 'selected':'$menu1';?>> 선택하세요 </option>
            </select>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">검정종류</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top">
            <select name='wr_data[exam_lot]' id='menu2' OnChange='javascript:getCataAllId(2)' required class="caaok-select">
                <!-- <option value='<?=$write['wr_12']?>' <?=($write['wr_12']=='' )? 'selected':'';?>> 선택하세요 </option> -->
                <option value='<?=$wr_data[' exam_lot']?>'
                    <?=($wr_data['exam_lot'] =='' )? 'selected':'';?>> 선택하세요 </option>
                <option value='<?=$wr_data[' license_lot']?>'
                    <?=($wr_data['license_lot'] =='' )? 'selected':'';?>> 선택하세요 </option>
            </select>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top ">검정장선택</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top">
            <select name='wr_data[exam_local]' id='menu3' OnChange='javascript:getCataAllId(3)' required class="caaok-select">
                <option value='<?=$wr_data[' exam_local']?>'
                    <?=($wr_data['exam_local'] =='' )? 'selected':'';?>> 선택하세요 </option>
            </select>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top border-bottom">검정일시</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top border-bottom">
            <select name='wr_data[exam_day]' id='menu4' OnChange='javascript:getCataAllId(4)' required class="caaok-select">
                <option value='<?=$wr_data[' exam_day']?>'
                    <?=($wr_data['exam_day'] =='' )? 'selected':'';?>> 선택하세요 </option>
            </select>
        </div>
    </div>
    <div class="clearfix" style="height: 30px;"></div>
    <div class="form-title-thin">
        <h4 class="info-box-g">결재방법선택</h4>
    </div>
    <div class="clearfix" style="height: 10px;"></div>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top">결재방법</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top">
            <select name="wr_data[pay]" required class="caaok-select">
                <option value="">선택하세요</option>
                <?php for($i=0; $i < count($pay_arr); $i++) { ?>
                <option value="<?php echo $pay_arr[$i];?>" <?php echo get_selected($pay_arr[$i], $wr_data['pay']);?>>
                    <?php echo $pay_arr[$i];?>
                </option>
                <?php } ?>
            </select>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top border-bottom">결재금액</div>
        <div class="col-md-10 col-xs-8 t-sub border-top border-bottom">
            <?php if ($w == '') { ?><span id="result" class="text-danger"> 원</span>
            <?php } ?>
            <?php
           list($licence_text, $licence_price) = explode("/",  $wr_data['license_lot']);
           echo $licence_price;
          ?>
            <?php
          list($licence_text, $licence_price) = explode("/", $wr_data['license_lot']);
          echo $licence_text;
            ?>
        </div>
    </div>
    <script>
    $('#menu1').on('change', function() { //자격증 선택시 응시료 선택 로직.
        $('#result').text(this.value ? this.value : '');
    });
    </script>
    <div class="form-title-thin">
        <div class="clearfix"></div>
    </div>
    <?php if ($w =='') { ?>
    <?php } else { ?>
    <?php if($is_admin) { ?>
    <div class="clearfix" style="height: 30px;"></div>
    <div class="form-title-thin-b">
        <h4 class="info-box-b">관리자채점(관리자전용)</h4>
    </div>
    <div class="clearfix" style="height: 10px;"></div>
    <div class="basic-info">
        <div class="col-md-2 col-xs-4 t-head border-top">발표일자<strong class="sound_only">필수</strong></div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top">
            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
            <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
            <script type="text/javascript">
            // commonjs
            const flatpickr = require("flatpickr");
            // es modules are recommended, if available, especially for typescript
            import flatpickr from "flatpickr";
            All of the following are valid ways to create flatpickr instance.
            // If using flatpickr in a framework, its recommended to pass the element directly
            flatpickr(element, {});
            // Otherwise, selectors are also supported
            flatpickr("#myID", {});
            // creates multiple instances
            flatpickr(".anotherSelector");
            //jQuery
            $(".selector").flatpickr(optional_config);
            </script>
            <input name="wr_data[test_day]" value="<?php echo $wr_data['test_day']; ?>" placeholder="선택하세요" required class="date caaok-select" />
            <script>
                var fp = flatpickr(".date", {
        enableTime: false,
        dateFormat: "y/m/d",
    })
</script>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top">검정점수</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top">
            <input type="text" name="wr_data[test_grade]" value="<?php echo $wr_data['test_grade']; ?>" class="caaok-select" placeholder="점수입력" required>
        </div>
        <div class="col-md-2 col-xs-4 t-head border-top border-bottom">검정결과</div>
        <div class="col-md-10 col-xs-8 ts-s-sub border-top border-bottom">
            <label>
                <input type="radio" name="wr_data[test_result]" value="합격" <?php echo get_checked('합격', $wr_data['test_result']);?>required>
                <span class="caaok-radio">합격</span>
            </label>
            <label>
                <input type="radio" name="wr_data[test_result]" value="불합격" <?php echo get_checked('불합격', $wr_data['test_result']);?>required>
                <span class="caaok-radio">불합격</span>
            </label>
        </div>
        <div class="form-title-thin-b">
            <div class="clearfix"></div>
        </div>
    </div>
    <?php } ?>
    <?php }  ?>
    <style type="text/css">
    label {
        display: inline-block;
        max-width: 100%;
        margin-bottom: 8px;
    }
    </style>
    <div class="write-btn">
        <button type="submit" id="btn_submit" accesskey="s" class="btn btn-send btn-lg"><b>
                <?php echo $w == '' ? '접수하기':'수정하기' ?></b></button>
        <?php if($is_admin) { ?>
        <a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn btn-<?php echo $btn1;?> btn-send btn-lg" role="button">목록으로</a>
        <?php } ?>
    </div>
    <div class="clearfix"></div>
</form>
<script>
function fwrite_submit(f) {
    <?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함  ?>
    <?php if($w == '') { ?>
    if (confirm("접수완료 후 수정하실 수 없습니다.\n\n접수하시겠습니까?")) {
        document.getElementById("btn_submit").disabled = "disabled";
        return true;
    } else {
        return false;
    }
    <?php } else { ?>
    document.getElementById("btn_submit").disabled = "disabled";
    return true;
    <?php } ?>
}
</script>
<script type="text/javascript">
/* JSON encode, parse  */
var stuff = <?php echo json_encode($nm); ?>;
var str = JSON.stringify(stuff);
var menuArr = new Array();
menuArr = JSON.parse(str);
var z1 = 0;
var temp1 = 0;
initCataID(1);
for (var m = 0; m < menuArr.length; m++) {
    if (menuArr[m].substring(0, menuArr[m].indexOf("|1|")) != temp1) {
        document.fwrite.menu1.length = document.fwrite.menu1.length + 1;
        document.fwrite.menu1.options[z1 + 1].value = menuArr[m].substring(0, menuArr[m].indexOf("|1|"));
        document.fwrite.menu1.options[z1 + 1].text = menuArr[m].substring(0, menuArr[m].indexOf("|1|"));
        temp1 = menuArr[m].substring(0, menuArr[m].indexOf("|1|"));
        z1++;
    }
    /*  index 1에 중복 제거입니다.  */
}
function gotomenu() {
    location.href = '#';
}
</script>

이 질문에 댓글 쓰기 :

답변 2

하단에 추가

<?php if ($w == 'u') { ?>
<script>
$(function() {
    $('#menu1').val('<?php echo $wr_data['license_lot'] ?>');
    getCataAllId(1);
    $('#menu2').val('<?php echo $wr_data['exam_lot'] ?>');
    getCataAllId(2);
    $('#menu3').val('<?php echo $wr_data['exam_local'] ?>');
    getCataAllId(3);
    $('#menu4').val('<?php echo $wr_data['exam_day'] ?>');
    getCataAllId(4);    
});
</script>
<?php } ?>

 

잘 될지는 모르겠습니다.

 

소스가 일단 너무 복잡합니다. 

이번에도 안된다면.. 작업 의뢰에 의뢰를 검토해 보시는 게 좋을 듯 싶습니다. https://sir.kr/request

고맙습니다. 맨 하단이 아니라 첫 script 아래에 넣어 주니 작동 하네요...너무너무너무 고맙습니다.
1개 빼고 다 완벽하게 작동합니다.
나머지 1개는 제가 어떻게 해볼께요...^^
복 받을 실 겁니다. ^^

수정페이지 진입했을때 셀렉트값을 초기화시켜주는게 안보입니다

 

 

답변을 작성하시기 전에 로그인 해주세요.
전체 40
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT