[Javascript] Netscape fails when calling document.frames from within a FRAME

Craig Michael Nathan cnathan at MEconomy.com
Wed May 23 20:51:26 CDT 2001


Hey all,
	I have an interesting problem:

	Apparently, if you make a call to document.frames
from within a FRAME, it ends that parsing of the javascript
then and there, with no error message.

	What's interesting is that if the FRAMESET is loaded
already, and the content of a frame is updated, this works fine.

	I've attached files that demonstrate this below and on
the URLs.

	Any help in getting document.frames to work correctly
the first time would be MOST appreciated.

	Thoughts?

		Thanks!

				-Craig

I've also put these files at:
  http://www.meconomy.com/ft/frametest.html
  http://www.meconomy.com/ft/foo.html
  http://www.meconomy.com/ft/foo2.html
  http://www.meconomy.com/ft/test.js


*** I have the file "frameset.html":

<html><head><title>FrameSet Test</title>
<FRAMESET cols="*,250">
  <FRAME src="foo.html">
  <FRAME src="foo.html">
</FRAMESET>
<body></body></html>


*** Where "foo.html" is:

<html><head><title>foo</title>
<body>
<script language="JavaScript1.2" src="test.js"></script>
  If this is in a Frame, you won't see the alert box!
  <br><br>
  However, if you <A href="foo2.html">click here</a>, to
  change the content of this frame to something nearly
  identical, you will see an alert box....
</body></html>


*** "foo2.html" is:

<html><head><title>foo</title>
<body>
<script language="JavaScript1.2" src="test.js"></script>
  This is Foo2 -- you'll see the pop-up!
</body></html>


*** And "test.js" is:

var isNetscape  = document.layers;

alert("This Doesn't Display on Netscape!");




More information about the Javascript mailing list