It doesn't seem to work, the onsubmit in the pop-up has a function to it
called setOpener(this), which sends values to variables in the opener form,
after that it should submit the opener form, but it doesn't. Here's the
setOpener function:
function setOpener(oForm) {
if (opener && !opener.closed) {
var recordNo =
self.location.search.substring(1,self.location.search.length);
var opener_form = opener.document.forms[0];
if (opener_form){
var chNo = eval('opener_form.changeNumber' + recordNo);
chNo.value = oForm.chNo.value;
var chDesc = eval('opener_form.changeDescription' + recordNo);
chDesc.value = oForm.chDesc.value;
}
self.close();
window.setTimeout('opener.document.forms[0].checkForm()', 42);
return true;
}
}
Thomas 'PointedEars' Lahn said:
Marco said:
I want to use the submit button of a new window to submit the form of the
new window (which carries two values to the opener window) and then submit
the opener form.
Can anyone tell me how to do this?
In the document of the new window:
<form ...
onsubmit="window.setTimeout('opener.document.forms[...].submit()', 42);
return true;"> <!-- one line recommended -->
YMMV
PointedEars