例として
テキストボックスのあるフレームを「base」、子ウィンドウを呼び出すフレームを「test」とします。
base側に「txtTest」というテキストボックスがあるとします。txtTestのあるFormの名前は「Form1」とします。
そこに子ウィンドウのボタンをクリックして、値をtxtTestに代入する処理が以下になります。
----------------------------【index.html】
<html>
<head>
<title></title>
</head>
<frameset cols="50%,*">
<frame src="1.html" name="base">
<frame src="2.html" name="test">
<NOFRAMES>
このページはフレーム対応のブラウザでご覧ください。
</NOFRAMES>
</FRAMESET>
<!--/main-->
<body>
</body>
</html>
----------------------------【フレーム[base]】-> 1.html
<HTML>
<body>
<form name="Form1">
<input type="text" name="txtTest">
</form>
</body>
</HTML>
----------------------------【フレーム[test]】-> 2.html
<HTML>
<script language="javascript">
function openwindow(){
window.open('3.html','kodomo','width=300,height=200');
}
</script>
<body>
<a href="#" onClick="openwindow();">TEST</a>
</body>
</HTML>
----------------------------【子ウィンドウ】-> 3.html
<HTML>
<head>
<script language="javascript">
<!--
function fncTest(){
// txtTestに12345をセットする
opener.top.base.document.Form1.txtTest.value=12345;
return false;
}
-->
</script>
</head>
<body>
<form name="thisForm">
<input type="button" value="てすと" onClick="return fncTest();">
</form>
</body>
</HTML>
----------------------------------------
分かりづらかったらすみません。
お礼
有難うございました。助かりました。