Ok, simple task… prompt the user with an embedded view of choices, save their selection in the parent form and then close the prompt window. Nothing too serious. In fact, I’ve done it before in another app, so I simply copied the code thinking it would work again. NOT! This is the code in my OK button (hotspot action) of the prompt form:
var selectField = window.document.forms[0].docs;
var targetForm = window.opener.document.forms[0];
var result = “x”;
for (var i=0; i<docs.length; i++)
if (docs[i].checked)
{
var result = docs[i].value;
}
values = result.split(‘~’);
targetForm.CustName.value = values[0];
targetForm.CompNo.value = values[1];
targetForm.Address.value = values[2];
targetForm.City.value = values[3];
targetForm.State.value = values[4];
targetForm.Zip.value = values[5];
targetForm.Country.value = values[6];
targetForm.Phone.value = values[7];
targetForm.Fax.value = values[8];
targetForm.AcctMgr.value = values[9];
targetForm.CSR.value = values[10];
targetForm.CustUNID.value = values[11];
//self.opener = this;
//self.close();
//frm = document.forms[0];
//frm.submit();
//dbpath = frm.BASFileFwd.value;
//window.open(“/”+dbpath+“/wCloseEvent?OpenForm”,“Close”)
As you can see, I’ve tried everything I can think of to close that $%@#% prompt window, but nothing works. The prompt window contents return to the opening frameset for the embedded view db. In fact, even now, with all closing commands commented out, it will still bring up the opening frameset in the prompt window. It’s driving me nuts.
In my Cancel button (hotspot action), I have window.close(); and it works perfectly.
What am I missing? Why does the Ok code above still continue to return me to the opening frameset? I’ve tried clearing I.E. history and it still does it.
Any ideas?
Bob