javascript frames works netscape not internet explorer

Discussion in 'Javascript' started by Randy Weber, Oct 26, 2004.

  1. Randy Weber

    Randy Weber Guest

    I have a page with two frames, 'header' and 'main'. The following
    code works in Netscape, but in Internet Explorer. The second bgColor
    line produces an error:

    function test(){
    top.frames.header.document.bgColor='white'; //works fine
    top.frames.main.document.bgColor='white'; //fails
    }

    Thanks in advance.
     
    Randy Weber, Oct 26, 2004
    #1
    1. Advertising

  2. Randy Weber

    Martin Walke Guest

    Hi Randy,

    It works for me ;-). Just make sure that your frames in your frameset file
    are named as you have specified i.e. header and main.

    Martin

    "Randy Weber" <> wrote in message
    news:...
    > I have a page with two frames, 'header' and 'main'. The following
    > code works in Netscape, but in Internet Explorer. The second bgColor
    > line produces an error:
    >
    > function test(){
    > top.frames.header.document.bgColor='white'; //works fine
    > top.frames.main.document.bgColor='white'; //fails
    > }
    >
    > Thanks in advance.
     
    Martin Walke, Oct 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    5,395
    Jonathan N. Little
    Dec 5, 2005
  2. =?Utf-8?B?RGlmZmlkZW50?=
    Replies:
    2
    Views:
    917
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=
    Mar 28, 2007
  3. JDeats
    Replies:
    2
    Views:
    584
    JDeats
    Sep 11, 2007
  4. Ed Hauptman
    Replies:
    7
    Views:
    1,034
    Ed Hauptman
    Aug 7, 2009
  5. Koh
    Replies:
    2
    Views:
    201
    Thomas 'PointedEars' Lahn
    May 11, 2004
Loading...

Share This Page