targeting between two windows

i was wondering if its possible to target between two windows, ie i have a login form in a popup window and when it is submitted i want it to close (which i can do already) but for the data to be sent to the main window for processing using the post method...now question is how?<!--content-->I think what you need to do is something like this...<br />
<br />
On you popup window...<br />
<br />
var data = "your info here";And on your main page...<br />
<br />
window.opener.document.formname.textfieldname.value = data;<!--content-->im not very good with javascript, although i see what you mean...i actually just thought of a very easy way to do this with php, but thanks anyways<!--content-->Originally posted by FLiX <br />
but for the data to be sent to the main window for processing using the post methodYou mean like the ACTION= part of the form tag?<br />
<br />
If the "main" window has a name, you can specify that name as target for the form action:<br />
<br />
<form method="post" action="someNewUrl" target="mainWindow" ... ><br />
<br />
you can set the name of the main window by using<br />
<br />
<script><br />
window.name = "mainWindow";<br />
</script><br />
<br />
in the file for the main page some time before you open the pop-up, or<br />
<br />
<script><br />
window.top.opener.name = "mainWindow";<br />
</script><br />
<br />
from the pop-up some time before the submit action happens (inline or onload).<!--content-->
 
Back
Top