Forum Moderators: open

Message Too Old, No Replies

Problems accessing DOM with Firefox, IE

can't change innerHTML for parent's parent's <title>

         

phillipandrews

1:58 am on Apr 10, 2006 (gmt 0)

10+ Year Member



I have a frameset within a frameset, for reasons I will not take the time to explain. I am trying to use JavaScript to change the title of the page that holds the main frameset, so the text in the title bar of the browser will change.
But when I try to do anything with parent.parent.document.getElementById("maintitle").innerHTML, Firefox (v1.0PR) whines, saying parent.parent.document.getElementById("maintitle") has no properties. In Internet Explorer (v6.0), I can access the innerHTML, but can't seem to change it because of an "Unknown Runtime Error." Is this a security issue or something else?

-Thanks,
Phillip

da644

10:53 pm on Apr 19, 2006 (gmt 0)

10+ Year Member



Hi.

This is not a security issue, but I think you might need an extra reference between parent.parent. and document to reference the frame that contains the element 'maintitle'. Something like:

parent.parent.FRAMENAME.document.getElementById("maintitle")

Kind regards,

Andrew
<snip>

[edited by: trillianjedi at 7:33 pm (utc) on April 20, 2006]
[edit reason] TOS [/edit]