Click to See Complete Forum and Search --> : 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?
I think what you need to do is something like this...
On you popup window...
var data = "your info here";And on your main page...
window.opener.document.formname.textfieldname.value = data;
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
gil davis
01-20-2003, 11:34 AM
Originally posted by FLiX
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?
If the "main" window has a name, you can specify that name as target for the form action:
<form method="post" action="someNewUrl" target="mainWindow" ... >
you can set the name of the main window by using
<script>
window.name = "mainWindow";
</script>
in the file for the main page some time before you open the pop-up, or
<script>
window.top.opener.name = "mainWindow";
</script>
from the pop-up some time before the submit action happens (inline or onload).