영카트 모바일에서 회원가입, 주문서에서 주소검색 버그 해결책

· 11년 전 · 2090
​회원가입이나 주문서에서 주소 검색을 할 경우

갤럭시에서 제공하는 기본 브라우저에서 버그가 존재해요( 모바일 파폭 등 다른 브라우저는 정상작동)

참고로 저는 갤럭시 노트 1이에요. 구형폰이에요.

그러니까 팝업이 나온 후 검색어 입력 후 결과 리스트에서 주소 게시물을 클릭 해도 부모페이지(parent.window)에  적용이 되지 않아요.

pc 버전은 되고요.

그래서 다음 주소 매뉴얼을 보고 소스를 수정 했는데요.

파일 : /js/common.js  == > 이와 같이


/**
 * 우편번호 창
 **/
var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) {
win_zip_close();
    if(typeof daum === 'undefined'){
        alert("다음 juso.js 파일이 로드되지 않았습니다.");
        return false;
    }

var element = document.getElementById('win_zipLayer');

if( g5_is_mobile ){
var oWidth = $("body").width();
element.style.width = oWidth + "px";
element.style.marginLeft = (oWidth / 2) * -1 + "px";
}

new daum.Postcode({
oncomplete: function(data) {
// 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
// 우편번호와 주소 및 영문주소 정보를 해당 필드에 넣는다.
var of = document[frm_name];
of[frm_zip1].value = data.postcode1;
of[frm_zip2].value = data.postcode2;
of[frm_addr1].value = data.address1;
of[frm_addr2].value = "";
of[frm_addr3].value = "";

if( data.addressType == "R" ){  //도로명이면
of[frm_addr3].value = data.address2;
}
if(of[frm_jibeon] !== undefined){
of[frm_jibeon].value = data.addressType;
}

of[frm_addr2].focus();
// iframe을 넣은 element를 안보이게 한다.
element.style.display = 'none';
},
width : '100%',
height : '100%'
}).embed(element);

// iframe을 넣은 element를 보이게 한다.
element.style.display = 'block';
}

var  win_zip_close = function() {
// iframe을 넣은 element를 안보이게 한다.
var element = document.getElementById('win_zipLayer');

element.style.display = 'none';
}



파일 : /tail.sub.php
<div id="win_zipLayer" style="display:none;border:1px solid;width:500px;height:300px;margin:5px 0;top:100px;left:50%;margin-left:-250px;position:fixed;-webkit-overflow-scrolling:touch;">
<img src="//i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-1px" onclick="win_zip_close()" alt="접기 버튼">


다음 주소 방식을 iframe 방식으로 하면 모바일, pc 전부 정상 작동 해요.


소스를 첨부파일로 업로드 할게요. 
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
11년 전 조회 2,206
11년 전 조회 2,272
11년 전 조회 1,868
11년 전 조회 1,441
11년 전 조회 1,759
11년 전 조회 2,120
11년 전 조회 3,486
11년 전 조회 2,011
11년 전 조회 2,366
11년 전 조회 2,067
11년 전 조회 1,820
11년 전 조회 4,919
11년 전 조회 1,866
11년 전 조회 2,125
11년 전 조회 1,782
11년 전 조회 2,160
11년 전 조회 1,839
11년 전 조회 1,441
11년 전 조회 1,462
11년 전 조회 1,938
11년 전 조회 1,986
11년 전 조회 2,023
11년 전 조회 2,043
11년 전 조회 1,688
11년 전 조회 1,757
11년 전 조회 4,539
11년 전 조회 2,407
11년 전 조회 1,331
11년 전 조회 1,753
11년 전 조회 1,599
11년 전 조회 2,989
11년 전 조회 1,485
11년 전 조회 1,656
11년 전 조회 1,352
11년 전 조회 1,755
11년 전 조회 1,496
11년 전 조회 1,762
11년 전 조회 2,533
11년 전 조회 1,353
11년 전 조회 1,359
11년 전 조회 2,472
11년 전 조회 2,238
11년 전 조회 2,184
11년 전 조회 1,565
11년 전 조회 2,271
11년 전 조회 1,813
11년 전 조회 1,693
11년 전 조회 1,891
11년 전 조회 2,031
11년 전 조회 2,091
11년 전 조회 2,041
11년 전 조회 4,801
11년 전 조회 3,729
11년 전 조회 1,791
11년 전 조회 2,279
11년 전 조회 5,897
11년 전 조회 2,747
11년 전 조회 2,106
11년 전 조회 1,753
11년 전 조회 2,339
11년 전 조회 2,333
11년 전 조회 2,014
11년 전 조회 1,517
11년 전 조회 1,748
11년 전 조회 1,641
11년 전 조회 1,904
11년 전 조회 2,349
11년 전 조회 2,362
11년 전 조회 1,563
11년 전 조회 2,212
11년 전 조회 1,918
11년 전 조회 1,679
11년 전 조회 5,818
11년 전 조회 5,360
11년 전 조회 1,887
11년 전 조회 5,193
11년 전 조회 4,772
11년 전 조회 5,168
11년 전 조회 6,032
11년 전 조회 5,726
11년 전 조회 5,239
11년 전 조회 1,752
11년 전 조회 6,627
11년 전 조회 2,496
11년 전 조회 1,965
11년 전 조회 3,956
11년 전 조회 1,922
11년 전 조회 3,627
11년 전 조회 3,233
11년 전 조회 2,368
11년 전 조회 2,605
11년 전 조회 1,927
11년 전 조회 3,108
11년 전 조회 1,893
11년 전 조회 6,421
11년 전 조회 3,263
11년 전 조회 4,336
11년 전 조회 1,937
11년 전 조회 2,118
11년 전 조회 1,993