Forum: Rails Spinoffs (closed, excessive spam) Prototype problem with Firefox 3

Posted by Puhfista (Guest)
on 2008-06-25 16:38
(Received via mailing list)
Hello,

I am running into an issue with prototype that is new to firefox 3. I
have a lightwindow (http://www.stickmanlabs.com/lightwindow/) popup,
and this popup changes elements of the parent window using javascript
as users do various things. In order to get elements on the parent
document, I do the following:

Element.select(parent.parent.document, "#idOfElement")[0];

The following works in all browsers EXCEPT Firefox 3. Firefox throws
the following error:

"NS_ERROR_DOM_WRONG_DOCUMENT_ERR". (https://bugzilla.mozilla.org/
show_bug.cgi?id=47903)

To get around this, I tried the new document.importNode (http://
developer.mozilla.org/en/docs/DOM:document.importNode) method:

Element.select(document.importNode(parent.parent.document.body, true),
"#idOfElement")[0];

 However, that only COPIES the body. I need access to the parent
document so I can manipulate the various DOM attributes (innerHTML,
src, etc) and have them effect the element, not a copy of the
element.

Anyone have any ideas what I could do?
Posted by kangax (Guest)
on 2008-06-25 17:43
(Received via mailing list)
I believe this was fixed in 1.6.0.2. Which version are you using?

- kangax
Posted by Puhfista (Guest)
on 2008-06-25 17:59
(Received via mailing list)
Kangax,

Thanks for responding.

I am using version 1.6.0.2.
This topic is locked and can not be replied to.