using the window.opener in javascript caues the javascript error - window.opener.formxxx has no properties

RESOLVED INVALID

Status

()

RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: mark, Assigned: bugzilla)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

using the window.opener in javascript  caues the javascript error -
window.opener.formxxx has no properties. This has been working fine in all IE
and Netscape. 

Reproducible: Always
Steps to Reproduce:
1.Create page that uses a button or url to call javascript that will open a new
window. 
2.Have a button on that new page that will call javascript code on the opening
page using window.opener.yourformname.submit(); - is a good example. 
3. 

Actual Results:  
The form is not submitted and any javascript commands after that are not
executed i.e window.close();

Expected Results:  
Submitted the procedure in the opening window that will refresh that page and
then close itself (2nd poped up window)
Please submit a testcase to demonstrate the bug. It's likely caused by an error
in the code.
(Reporter)

Comment 2

14 years ago
No error in code as currently working.  However window.opener.document.formxxx 
(vs. window.opener.formxxx) does work 
window.opener.formxxx is not a valid way to reference the object, as it refers
to the opening window, not it's corresponding document. That's why
window.opener.document.formxxx does work.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.