dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Controlling elements across frames in Netscape 4.

  1. #1
    Join Date
    May 2005
    Posts
    2

    Controlling elements across frames in Netscape 4.

    Can anyone assist, please.
    I am trying to change the text of a DIV element in another frame. This works with DOM but I also have it working in Netscape 4.7.

    For NS 4.x I am using:

    parent.frames['head'].document.layers['pageheader'] = text

    where 'head" is the name of the frame and pageheader is the ID of the DIV in this frame but it doesn't work...

    Suggestions please?

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    try, for NS4:

    var obj = top.frames['head'].document.layers['pageheader'].document;
    obj.open();
    obj.write(text);
    obj.close();

  3. #3
    Join Date
    May 2005
    Posts
    2
    Thanks but the console reports that "top.frames.head.document.layers.pageheader has no
    properties. "

    The element inside "head" is <div id="pageheader" class="headtext">&nbsp;</div>

    Any other suggestions?

  4. #4
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    than try parent.frames['head'].....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles