그누보드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,273
11년 전 조회 1,600
11년 전 조회 1,615
11년 전 조회 1,594
11년 전 조회 1,054
11년 전 조회 1,445
11년 전 조회 1,773
11년 전 조회 1,753
11년 전 조회 1,100
11년 전 조회 1,459
11년 전 조회 1,257
11년 전 조회 2,000
11년 전 조회 1,648
11년 전 조회 1,038
11년 전 조회 2,430
11년 전 조회 6,926
11년 전 조회 1,562
11년 전 조회 1,450
11년 전 조회 1,333
11년 전 조회 1,203
11년 전 조회 1,753
11년 전 조회 1,126
11년 전 조회 3,714
11년 전 조회 1,551
11년 전 조회 1,936
11년 전 조회 1,320
11년 전 조회 2,944
11년 전 조회 1,575
11년 전 조회 2,868
11년 전 조회 2,225
11년 전 조회 2,744
11년 전 조회 1,703
11년 전 조회 2,820
11년 전 조회 1,649
11년 전 조회 1,351
11년 전 조회 1,317
11년 전 조회 5,690
11년 전 조회 1,540
11년 전 조회 1,091
11년 전 조회 1,034
11년 전 조회 1,437
11년 전 조회 1,764
11년 전 조회 2,194
11년 전 조회 2,508
11년 전 조회 1,399
11년 전 조회 1,721
11년 전 조회 1,662
11년 전 조회 1,280
11년 전 조회 1,080
11년 전 조회 2,471
11년 전 조회 1,720
11년 전 조회 3,553
11년 전 조회 1,488
11년 전 조회 1,328
11년 전 조회 2,401
11년 전 조회 3,046
11년 전 조회 2,408
11년 전 조회 3,457
11년 전 조회 1,853
11년 전 조회 3,589
11년 전 조회 1,107
11년 전 조회 1,409
11년 전 조회 2,266
11년 전 조회 2,593
11년 전 조회 1,240
11년 전 조회 3,122
11년 전 조회 3,277
11년 전 조회 1,840
11년 전 조회 2,508
11년 전 조회 1,357
11년 전 조회 1,711
11년 전 조회 1,382
11년 전 조회 2,603
11년 전 조회 2,491
11년 전 조회 1,472
11년 전 조회 5,600
11년 전 조회 2,650
11년 전 조회 3,375
11년 전 조회 2,227
11년 전 조회 1,258
11년 전 조회 2,328
11년 전 조회 2,495
11년 전 조회 2,157
11년 전 조회 1,769
11년 전 조회 1,277
11년 전 조회 2,152
11년 전 조회 2,905
11년 전 조회 1,593
11년 전 조회 3,110
11년 전 조회 2,051
11년 전 조회 4,807
11년 전 조회 2,143
11년 전 조회 2,802
11년 전 조회 4,027
11년 전 조회 1,906
11년 전 조회 2,748
11년 전 조회 1,124
11년 전 조회 2,162
11년 전 조회 4,801
11년 전 조회 1,939