IE Frameset OnLoad "Object doesn't support this property or method" error

Discussion in 'Javascript' started by mygoogleac, Oct 2, 2003.

  1. mygoogleac

    mygoogleac Guest

    Folks,

    Take a look at the sample code below and let me know if you can figure
    out why I'm getting an "Object doesn't support this property or
    method" error for the "frame2.DisplayForm()" only after selecting the
    Refresh icon in IE. In other words, it loads and performs fine on the
    initial load. I'm thinking this is a timing issue but my understanding
    is the "OnLoad" option to the Frameset will only run AFTER the frames
    are load. Thanks in advance for any help.

    SLS

    ----FrameSet.html--------------------------

    <HTML>
    <HEAD>
    <TITLE>Frame Set Demo</TITLE>
    </HEAD>
    <FRAMESET ROWS="10%,90%" FRAMEBORDER=1
    OnLoad="frame2.DisplayForm()">
    <FRAME src="Frame1.html" NAME="frame1">
    <FRAME src="Frame2.html" NAME="frame2">
    </FRAMESET>
    </HTML>



    ----Frame1.html--------------------------

    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE='JavaScript'>
    function foo(){
    alert("foo()")
    }
    </SCRIPT>
    </HEAD>

    <BODY>
    </BODY>
    </HTML>



    ----Frame2.html--------------------------
    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function DisplayForm(){
    document.writeln("<FORM>")
    document.writeln("<SELECT SIZE=3>")
    document.writeln(" <OPTION>foo")
    document.writeln(" <OPTION>bar")
    document.writeln(" <OPTION>baz")
    document.writeln("</SELECT>")
    document.writeln("</FORM>")
    document.close()
    }

    </SCRIPT>
    </HEAD>

    <BODY>
    </BODY>
    </HTML>
    mygoogleac, Oct 2, 2003
    #1
    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. Roman
    Replies:
    0
    Views:
    4,021
    Roman
    Jan 4, 2004
  2. Matt
    Replies:
    3
    Views:
    192
  3. news.onetel.net.uk
    Replies:
    3
    Views:
    205
    Michael Winter
    Aug 9, 2004
  4. SmittyBroham
    Replies:
    2
    Views:
    120
    SmittyBroham
    Jan 7, 2005
  5. Replies:
    5
    Views:
    251
    Thomas 'PointedEars' Lahn
    May 15, 2005
Loading...

Share This Page