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

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


<a href="<?php echo G5_BBS_URL ?>/zip.php?frm_name=fregisterform&frm_zip1=mb_zip1&frm_zip2=mb_zip2&frm_addr1=mb_addr1&frm_addr2=mb_addr2&frm_addr3=mb_addr3&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,236
11년 전 조회 1,561
11년 전 조회 1,572
11년 전 조회 1,544
11년 전 조회 1,011
11년 전 조회 1,401
11년 전 조회 1,724
11년 전 조회 1,698
11년 전 조회 1,053
11년 전 조회 1,420
11년 전 조회 1,204
11년 전 조회 1,950
11년 전 조회 1,594
11년 전 조회 984
11년 전 조회 2,385
11년 전 조회 6,866
11년 전 조회 1,508
11년 전 조회 1,391
11년 전 조회 1,281
11년 전 조회 1,159
11년 전 조회 1,701
11년 전 조회 1,084
11년 전 조회 3,667
11년 전 조회 1,501
11년 전 조회 1,880
11년 전 조회 1,267
11년 전 조회 2,893
11년 전 조회 1,531
11년 전 조회 2,826
11년 전 조회 2,179
11년 전 조회 2,697
11년 전 조회 1,653
11년 전 조회 2,781
11년 전 조회 1,582
11년 전 조회 1,296
11년 전 조회 1,269
11년 전 조회 5,637
11년 전 조회 1,482
11년 전 조회 1,043
11년 전 조회 986
11년 전 조회 1,381
11년 전 조회 1,711
11년 전 조회 2,142
11년 전 조회 2,448
11년 전 조회 1,340
11년 전 조회 1,663
11년 전 조회 1,612
11년 전 조회 1,225
11년 전 조회 1,018
11년 전 조회 2,423
11년 전 조회 1,668
11년 전 조회 3,498
11년 전 조회 1,432
11년 전 조회 1,267
11년 전 조회 2,349
11년 전 조회 2,999
11년 전 조회 2,363
11년 전 조회 3,403
11년 전 조회 1,803
11년 전 조회 3,527
11년 전 조회 1,047
11년 전 조회 1,353
11년 전 조회 2,220
11년 전 조회 2,540
11년 전 조회 1,192
11년 전 조회 3,074
11년 전 조회 3,227
11년 전 조회 1,787
11년 전 조회 2,454
11년 전 조회 1,301
11년 전 조회 1,651
11년 전 조회 1,333
11년 전 조회 2,549
11년 전 조회 2,442
11년 전 조회 1,424
11년 전 조회 5,547
11년 전 조회 2,592
11년 전 조회 3,318
11년 전 조회 2,171
11년 전 조회 1,204
11년 전 조회 2,275
11년 전 조회 2,437
11년 전 조회 2,108
11년 전 조회 1,718
11년 전 조회 1,213
11년 전 조회 2,102
11년 전 조회 2,839
11년 전 조회 1,539
11년 전 조회 3,062
11년 전 조회 1,997
11년 전 조회 4,744
11년 전 조회 2,092
11년 전 조회 2,756
11년 전 조회 3,982
11년 전 조회 1,856
11년 전 조회 2,696
11년 전 조회 1,075
11년 전 조회 2,108
11년 전 조회 4,750
11년 전 조회 1,886