You are here: irt.org | FAQ | JavaScript | Window | Q676 [ previous next ]
First the form:
<SCRIPT LANGUAGE="JavaScript"><!-- function myWindow(openWindow) { if (openWindow) { windowHandle = window.open('mypage.htm','windowName','width=200,height=200'); if (!windowHandle.opener) windowHandle.opener = self; } else windowHandle.close(); } //--></SCRIPT> <FORM NAME="myForm"> <INPUT NAME="myCheckbox" TYPE="CHECKBOX" onClick="myWindow(this.checked)"> </FORM>
Then in the new window:
<BODY onUnload="opener.document.myForm.myCheckbox.checked = false">