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. Advertisements

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,283
    Roman
    Jan 4, 2004
  2. Matt
    Replies:
    3
    Views:
    349
  3. news.onetel.net.uk
    Replies:
    3
    Views:
    431
    Michael Winter
    Aug 9, 2004
  4. SmittyBroham
    Replies:
    2
    Views:
    260
    SmittyBroham
    Jan 7, 2005
  5. Drew
    Replies:
    1
    Views:
    193
    Martin Honnen
    Nov 8, 2006
  6. Replies:
    6
    Views:
    221
    Richard Cornford
    Aug 26, 2008
  7. MattW
    Replies:
    4
    Views:
    577
    MattW
    Jun 25, 2009
  8. oo7bopnd
    Replies:
    0
    Views:
    1,050
    oo7bopnd
    Sep 1, 2015
Loading...