rendered paste body//parent window
//message.php
<form name="stockForm" method="post" action="">
<a href="message.php">Inbox</a> | <a href="message.php?action=compose">Compose</a>
<hr size="1" bordercolor="#CFCFCF" width="70%" align="left">
<table border="1" width="70%" cellspacing="0" cellpadding="3" bordercolor="#CFCFCF">
<tr>
<td colspan="2" bgcolor="#EFEFEF"><b><font size="3">Send Message: </font></b><br></td>
</tr>
<tr>
<td>Recipients Nick/NIC/Email: <font color="#ff0000">*</font> </td>
<td><input type="text" name="stockBox"><a href="#" onClick="window.open('address.php','message','width=500,height=300,resizable=1,scrollbars=yes');">Address Book</a></td>
</tr>
<tr>
<td>Subject:</td>
<td><input type="text" name="textfield"></td>
</tr>
<tr>
<td width="15%">Message:</td>
<td width="64%"><textarea name="textarea"></textarea></td>
</tr>
<tr>
<td colspan="2" height="35"><div align="center">
<input type="submit" name="submit" value="send">
</div>
</td>
</tr>
</table>
</form>
//child window
//address.php
<HTML>
<HEAD>
<TITLE>Stock List</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function pick() {
theForm = document.forms['address'];
if (window.opener && !window.opener.closed)
for (i = 0; i < list.length; i++){
if (theForm.elements['list'+i].checked == true){
checked_list += theForm.elements['list'+i].value;
}
window.opener.document.stockForm.stockBox.value = checked_list;
window.close();
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<form name="address" action="" method="post">
<input type="checkbox" name="list" value="wootwoot">wootwoot
<input type="checkbox" name="list" value="micheal">micheal
<input type="submit" name="submit" value="submit" onclick="pick()">
</form>
</BODY>
</HTML>