프로그래밍/스크립트
우편번호 부모창서 요청하고 자식창서 받기
Doonee
2013. 11. 27. 17:40
반응형
[1] 부모창 : 우편번호 받을 함수
// 우편번호 받기
function ReceivePostcode(code, code_text) {
$('#hfPostcode').val(code);
$('#tbxAddres').val(code_text);
$('#hfPosttext').val(code_text);
}
[2] 부모창 : 팝업(자식창)띄우는 함수
//지역검색
$('#btnPostNumber').click(function () {
window.open('Zipcode.aspx?form=btnPostNumber', '201311271043', 'width=550, height=350');
return false;
});
[3] 자식창 : 부모창에 우편번호 넘겨주는 함수
// 부모창에 우편번호 넘겨주는 함수
function SetParentForm(code, code_text) {
parent.window.opener.ReceivePostcode(code, code_text);
self.close();
}