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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I believe this was fixed in 1.6.0.2. Which version are you using? - kangax On Jun 25, 10:37 am, Puhfista <puhfis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Kangax, Thanks for responding. I am using version 1.6.0.2. On Jun 25, 10:42 am, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I believe this was fixed in 1.6.0.2. Which version are you using? > > - kangax > > On Jun 25, 10:37 am, Puhfista <puhfis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---