그누보드5 에 Daum 우편번호 찾기 API 연동 하기

관련파일 : skin/member/basic/register_form.skin.php


<a href="<?php echo G5_BBS_URL ?>/zip.php?frm_name=fregisterform&amp;frm_zip1=mb_zip1&amp;frm_zip2=mb_zip2&amp;frm_addr1=mb_addr1&amp;frm_addr2=mb_addr2&amp;frm_addr3=mb_addr3&amp;frm_jibeon=mb_addr_jibeon" id="reg_zip_find" class="btn_frmline win_zip_findtarget="_blank">주소 검색</a><br>


<a href="javascript:openDaumPostcode();" id="reg_zip_find" class="btn_frmline">주소 검색</a><br>

로 변경.
이때 a 태그에 들어있던 win_zip_find 클래스를 삭제하는것이 포인트 입니다.
삭제를 안하면 기존 win_zip_find click 이벤트와 충돌이 납니다.


그리고 맨 하단에 아래 자바스크립트 코드를 추가합니다.

<script type="text/javascript">
<!--
    function openDaumPostcode() {
        new daum.Postcode({
            oncomplete: function(data) {
                document.getElementById('reg_mb_zip1').value = data.postcode1;
                document.getElementById('reg_mb_zip2').value = data.postcode2;
                document.getElementById('reg_mb_addr1').value = data.address;
                document.getElementById('reg_mb_addr2').focus();
                document.getElementById('reg_mb_addr3').value = data.addressEnglish;
            }
        }).open();
    }
//-->
</script>

모바일은 아래 링크를 참조하세요.


첨부파일

register_form.skin.php (23.1 KB) 14회 2014-06-28 11:45
|

댓글 1개

감사합니다 !
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
11년 전 조회 2,165
11년 전 조회 1,474
11년 전 조회 1,479
11년 전 조회 1,478
11년 전 조회 933
11년 전 조회 1,332
11년 전 조회 1,655
11년 전 조회 1,630
11년 전 조회 989
11년 전 조회 1,344
11년 전 조회 1,118
11년 전 조회 1,871
11년 전 조회 1,516
11년 전 조회 909
11년 전 조회 2,315
11년 전 조회 6,796
11년 전 조회 1,446
11년 전 조회 1,309
11년 전 조회 1,223
11년 전 조회 1,086
11년 전 조회 1,625
11년 전 조회 1,000
11년 전 조회 3,591
11년 전 조회 1,422
11년 전 조회 1,814
11년 전 조회 1,190
11년 전 조회 2,829
11년 전 조회 1,456
11년 전 조회 2,740
11년 전 조회 2,105
11년 전 조회 2,622
11년 전 조회 1,570
11년 전 조회 2,705
11년 전 조회 1,507
11년 전 조회 1,214
11년 전 조회 1,205
11년 전 조회 5,571
11년 전 조회 1,413
11년 전 조회 960
11년 전 조회 915
11년 전 조회 1,300
11년 전 조회 1,623
11년 전 조회 2,059
11년 전 조회 2,372
11년 전 조회 1,270
11년 전 조회 1,583
11년 전 조회 1,524
11년 전 조회 1,159
11년 전 조회 952
11년 전 조회 2,346
11년 전 조회 1,585
11년 전 조회 3,413
11년 전 조회 1,345
11년 전 조회 1,186
11년 전 조회 2,277
11년 전 조회 2,922
11년 전 조회 2,282
11년 전 조회 3,328
11년 전 조회 1,711
11년 전 조회 3,452
11년 전 조회 971
11년 전 조회 1,268
11년 전 조회 2,140
11년 전 조회 2,472
11년 전 조회 1,138
11년 전 조회 2,997
11년 전 조회 3,170
11년 전 조회 1,713
11년 전 조회 2,373
11년 전 조회 1,236
11년 전 조회 1,567
11년 전 조회 1,258
11년 전 조회 2,461
11년 전 조회 2,355
11년 전 조회 1,341
11년 전 조회 5,474
11년 전 조회 2,523
11년 전 조회 3,244
11년 전 조회 2,096
11년 전 조회 1,134
11년 전 조회 2,200
11년 전 조회 2,345
11년 전 조회 2,043
11년 전 조회 1,640
11년 전 조회 1,141
11년 전 조회 2,015
11년 전 조회 2,754
11년 전 조회 1,477
11년 전 조회 2,971
11년 전 조회 1,916
11년 전 조회 4,663
11년 전 조회 2,020
11년 전 조회 2,681
11년 전 조회 3,903
11년 전 조회 1,773
11년 전 조회 2,627
11년 전 조회 998
11년 전 조회 2,032
11년 전 조회 4,663
11년 전 조회 1,796
🐛 버그신고