M
Marco Alting
Hi
I'm trying to send values between 2 HTML forms, I'm able to do this in a
simple setup, but my opener form is generated from ASP and has multiple
rows, where textfield names get a sequential number. Now I have a function
which I can send the sequential number to, but I don't know how to
incorporate this number into the function of the popup window. There are two
fields in the popup window which values need to be send to corresponding
hidden fields in the opener window (including the sequential number
ofcourse. Here's the code I use, hope you can help:
Opener window:
function setChangeNo(variation){
var ChangeNo = null;
if (ChangeNo && !ChangeNo.closed) kid.close();
ChangeNo = open('popup_change.asp?variation=' + variation,'ChangeNo');
}
Popup window:
function setOpener(oForm) {
if (opener && !opener.closed) {
var opener_form = opener.document.forms[0];
var changeDescription = changeDescription + recordNo;
if (opener_form){
opener_form.changeNumber.value = oForm.chNo.value;
opener_form.changeDescription.value = oForm.chDesc.value;
}
self.close();
return false;
}
}
onload = function() {
document.forms[0].chNo.focus();
}
I'm trying to send values between 2 HTML forms, I'm able to do this in a
simple setup, but my opener form is generated from ASP and has multiple
rows, where textfield names get a sequential number. Now I have a function
which I can send the sequential number to, but I don't know how to
incorporate this number into the function of the popup window. There are two
fields in the popup window which values need to be send to corresponding
hidden fields in the opener window (including the sequential number
ofcourse. Here's the code I use, hope you can help:
Opener window:
function setChangeNo(variation){
var ChangeNo = null;
if (ChangeNo && !ChangeNo.closed) kid.close();
ChangeNo = open('popup_change.asp?variation=' + variation,'ChangeNo');
}
Popup window:
function setOpener(oForm) {
if (opener && !opener.closed) {
var opener_form = opener.document.forms[0];
var changeDescription = changeDescription + recordNo;
if (opener_form){
opener_form.changeNumber.value = oForm.chNo.value;
opener_form.changeDescription.value = oForm.chDesc.value;
}
self.close();
return false;
}
}
onload = function() {
document.forms[0].chNo.focus();
}