See the following example. Use the 'opener' object to get to your initial window.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<script language="javascript">
<!--
function popup()
{
var win = window.open('','','toolbar=yes,scrollbars=yes,width=200,height=300')
win.document.write('<html><body><input type="text" name="intext" id="intext"><br>');
win.document.write('<a href="javascript:opener.document.forms[0].mytext.value=intext.value;this.close()">close</a>');
win.document.write('</body></html>');
}
//-->
</script>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
<form name="myform" id="myform">
<input type="text" id="mytext" name="mytext" onclick="javascript:popup();">
</form>
</BODY>
</HTML>
Bookmarks