M
mygoogleac
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>
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>