|
-
Nov 12th, 2005, 11:06 AM
#1
Thread Starter
Addicted Member
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.
"The Force will be with you, always."
--Ben Kenobi--
-
Nov 12th, 2005, 11:26 AM
#2
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.
-
Nov 12th, 2005, 11:41 AM
#3
Thread Starter
Addicted Member
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.
"The Force will be with you, always."
--Ben Kenobi--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|