그누보드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,408
11년 전 조회 1,741
11년 전 조회 1,745
11년 전 조회 1,726
11년 전 조회 1,190
11년 전 조회 1,592
11년 전 조회 1,936
11년 전 조회 1,883
11년 전 조회 1,232
11년 전 조회 1,599
11년 전 조회 1,390
11년 전 조회 2,130
11년 전 조회 1,771
11년 전 조회 1,168
11년 전 조회 2,543
11년 전 조회 7,046
11년 전 조회 1,690
11년 전 조회 1,576
11년 전 조회 1,447
11년 전 조회 1,349
11년 전 조회 1,873
11년 전 조회 1,250
11년 전 조회 3,840
11년 전 조회 1,677
11년 전 조회 2,050
11년 전 조회 1,454
11년 전 조회 3,065
11년 전 조회 1,754
11년 전 조회 2,991
11년 전 조회 2,386
11년 전 조회 2,856
11년 전 조회 1,872
11년 전 조회 2,939
11년 전 조회 1,779
11년 전 조회 1,469
11년 전 조회 1,463
11년 전 조회 5,822
11년 전 조회 1,657
11년 전 조회 1,218
11년 전 조회 1,163
11년 전 조회 1,545
11년 전 조회 1,871
11년 전 조회 2,316
11년 전 조회 2,630
11년 전 조회 1,516
11년 전 조회 1,828
11년 전 조회 1,780
11년 전 조회 1,395
11년 전 조회 1,192
11년 전 조회 2,618
11년 전 조회 1,863
11년 전 조회 3,668
11년 전 조회 1,598
11년 전 조회 1,432
11년 전 조회 2,518
11년 전 조회 3,155
11년 전 조회 2,518
11년 전 조회 3,560
11년 전 조회 1,977
11년 전 조회 3,730
11년 전 조회 1,225
11년 전 조회 1,526
11년 전 조회 2,379
11년 전 조회 2,731
11년 전 조회 1,370
11년 전 조회 3,249
11년 전 조회 3,421
11년 전 조회 1,966
11년 전 조회 2,632
11년 전 조회 1,476
11년 전 조회 1,827
11년 전 조회 1,507
11년 전 조회 2,727
11년 전 조회 2,614
11년 전 조회 1,601
11년 전 조회 5,753
11년 전 조회 2,812
11년 전 조회 3,513
11년 전 조회 2,367
11년 전 조회 1,382
11년 전 조회 2,454
11년 전 조회 2,635
11년 전 조회 2,303
11년 전 조회 1,911
11년 전 조회 1,400
11년 전 조회 2,274
11년 전 조회 3,077
11년 전 조회 1,756
11년 전 조회 3,231
11년 전 조회 2,218
11년 전 조회 4,963
11년 전 조회 2,294
11년 전 조회 2,947
11년 전 조회 4,182
11년 전 조회 2,045
11년 전 조회 2,900
11년 전 조회 1,270
11년 전 조회 2,307
11년 전 조회 4,954
11년 전 조회 2,069