It might be easier for Javascript to run onload in the child window, and then get the data from the parent window. But that might not always be possible, so you can try something like this:
Code:
var newWin = null; // global
function newWindow()
{
if (!newWin || newWin.closed) {
newWin = window.open('popup','addwin','width=500,height=250,status=yes,scrollbars=yes,resizable=yes');
waitForWin();
}
}
function waitForWin()
{
if (newWin.document && newWin.document.forms && newWin.document.forms['childWinForm']) {
newWin.document.forms['childWinForm'].text1.value = document.forms['parentWinForm'].text1.value;
}
else {
setTimeout(waitForWin, 250);
}
}
Bookmarks