Click to See Complete Forum and Search --> : Window.Opener Question...


kj2w
01-07-2003, 09:46 AM
I have a window.open that opens a window named 'addGroup'. Now the window 'addGroup' has 1 form with an textbox and a submit button. When I click submit in 'addGroup' how can I get it to pass the value back to its parent page? Here is what I have so far:

<script language="JavaScript">
function sendData(m){

return true;
}
</script>
</head>
<body>
<form action="test2.cfm" method="post" onSubmit='return sendData(this);'>
Please type in a new group:
<br>
<input type="text" name="newGroup" size="20">
<br>
<input type="submit">
</form>
</body>

khalidali63
01-07-2003, 09:57 AM
In the child window
use this line of code to pass your data to parent windows form element

top.opener.document.frameName.elementName.value=ChildWindowDataValue