Re: cliente-side dynamic XSLT transformation with javascript
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
..tato.. wrote:
> there was an error in the code I provided, the right is:
> var target = parent.frmBot.document.getElementById("display");
> while (target.hasChildNodes())
> target.removeChild(target.childNodes[0]);
>
> target.appendChild(xmlNode);
>
> But the problem arises when I try to get the 'target' from
> parent.framename.getElementById() instruction, returning null.
> Is it legal to getElementById cross frame?
> Browser reported some security violations that made me suppose it is not.
If you get null but no error then there is no element with that id in
the document you called getElementById on.
If you get an error reporting a security violation then one frame
document is probably from a different server and then the same origin
policy indeed prevents script in a document from one server to access
stuff in the document from a different server.
--
Martin Honnen
http://JavaScript.FAQTs.com/