開いたウインドウ側で、元のウインドウ内の変数に オブジェクトをセットする事によって操作可能です
http://lightbox.matrix.jp/ginpro/html/win_control_01.htm
[[開いたウインドウを閉じる]]
@HTML
<script type="text/javascript">
function closeWindow() {
try {
if ( openObject.closed ) {
alert("ウインドウはウインドウ側で閉じられました");
}
else {
openObject.close();
}
openObject = null;
}
catch(e) {
alert("ウインドウが存在しません");
}
}
</script>
<input type=button value="アンカーで開いたウインドウを閉じる" onclick='closeWindow();'>
@HEND
@DIV
<script type="text/javascript">
function closeWindow() {
try {
if ( openObject.closed ) {
alert("ウインドウはウインドウ側で閉じられました");
}
else {
openObject.close();
}
openObject = null;
}
catch(e) {
alert("ウインドウが存在しません");
}
}
</script>
<input type=button value="閉じる" onclick="closeWindow();">
@END
|