Dynamic Form Name Question...
Hello All,
I have a page that is using the window.opener function to create a new form. Fine enough, except that my parent page has several forms on it with the same elements in it. How can I identify the form that was submitted to the child popup window? I have tried using this:
window.opener.document.forms.formName
but that doesn't seem to work.
Any help on this would be greatly appreciated.
Thanks,
Jim P.
Re: Dynamic Form Name Question...
The window.opener property only references the window that opened it. Not the form. You should pass the form name from the function it was called from.
Re: Dynamic Form Name Question...
Mendhak,
Can you give me an example of how I would do that? Here's the current function...actually, I think it's one that you posted in another posting.
Code:
function Insert(frmName)
{
var frmName
var winW=500;
var winH=300;
var w=screen.width;
var h=screen.height;
var t=h/2-winH/2;
var l=w/2-winW/2;
var url = "price_edit.asp?Form="+frmName
var hWnd = window.open(url,"","top=" + t + ", left=" + l + ", width=" + winW+ ",height=" + winH+ ",resizable=yes,status=yes,scrollbars=yes,location=yes");
if ((document.window != null) && (!hWnd.opener))
hWnd.opener = document.window;
}
Thanks,
Jim P.