자식창에서 날짜 입력 받아 부모창 넘기기 질문드려요.
본문
write 스킨이 3개 글쓰기를 할 때 날짜값을 입력 받아서 넘기려고 합니다.
주소도 그렇고 다 넘어가지는데 캘린더로 받은 날짜값이 넘어가 지지가 않네요..
자식창 소스는 아래에...
기 준 일 : <input type=text id=to_date name=to_date size=8 maxlength=8 itemname='기간' required value='<?=$to_date?>' readonly title='옆의 달력 아이콘을 클릭하여 날짜를 입력하세요.'>
<a href="javascript:win_calendar('to_date', document.getElementById('to_date').value, '');"><img src='<?=$member_skin_path?>/img/calendar.gif' border="0"
align="absmiddle" title='달력 - 날짜를 선택하세요' /> </a>
날짜를 입력 받아서...
<script type="text/javascript">
function pageChange(){
window.opener.location.href="http://192.168.0.3/bbs/write.php?bo_table=pay&mode=1&sca=종사자급여&to_date=<?=$to_date?>";
window.close();
};
</script>
자바스크립트를 이용해서 넘기는데요..
<?=$to_date?> 값이 빈 값으로 넘어 가 지네요...
주소중략..&mode=1&sca=종사자급여&to_date=
이렇게 주소창에 값이 나오네요...
답변 3
window.opener.location.href="http://192.168.0.3/bbs/write.php?bo_table=pay&mode=1&sca=종사자급여&to_date="+document.getElementbyId('to_date').value;
자식창에서 to_date 값을 <?php echo $_REQUEST['todate']; ?> 로 사용해보세요!
일주일간 이걸 넘길려고 고생을 했네요..
아래와 같은 형태로 하면 넘어가네요...
ㅠ.ㅠ +" 고생을 했다니 눈물이 납니다..흑
window.opener.location.href="http://192.168.0.3/bbs/write.php?bo_table=pay&mode=1&sca=종사자급여&to_date="+to_date+"";
!-->
답변을 작성하시기 전에 로그인 해주세요.