Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

window.opener.document.getElementById not working

1,094 views
Skip to first unread message

MaxiWheat

unread,
Apr 3, 2007, 1:48:00 PM4/3/07
to
Hi,

I am trying to get my values entered in a popup window to populate the
fields in the opener window. Actually when I do something like this :

window.opener.document.getElementById('myElement').value =
document.getElementById('myOtherElement').value

it works in IE6, but why FF does not support
window.opener.document.getElementById ? When I inspect the DOM with
Firebug, I see that the method getElementById does not exists for
window.opener.document ...

Anyone knows an alternative that is not obsolete code and works for IE
and FF ?

Thank you

joe...@googlemail.com

unread,
Apr 13, 2007, 7:51:58 AM4/13/07
to

I had a recent problem involving getElementByID:

IE and Opera were both retrieving the object via
window.opener.document.getElementById, but Firefox wasn't. Problem
turned out to be with the form itself, the form field I was trying to
access - a select - didn't have an id tag, just a name. IE and opera
were ignoring this and using the elements name, whereas FF was
returning NULL untill I added the id tag.

0 new messages