I have a frameset page with the following code snippets:
..
..
..
<script type="text/javascript">
<!--
var bannerFrame;
function load () {
var bannerDoc = bannerFrame.doc ument;
alert(bannerFra me.name);
alert(bannerDoc .URL);
}
// -->
</script>
</head>
<frameset frameborder="0" rows="10%,*" onLoad="load(); ">
<frame id="banner" name="banner"
src="banner.htm " noresize="nores ize" scrolling="no"
onLoad="bannerF rame=this;" />
..
..
..
When I run this the first alert message gives me the correct name. The
second alert gives me the url of the frameset page, not of the frame page.
Why is this, and how should I modify the script so that I can grab the
document for the frame?
Thanks.
Ken
..
..
..
<script type="text/javascript">
<!--
var bannerFrame;
function load () {
var bannerDoc = bannerFrame.doc ument;
alert(bannerFra me.name);
alert(bannerDoc .URL);
}
// -->
</script>
</head>
<frameset frameborder="0" rows="10%,*" onLoad="load(); ">
<frame id="banner" name="banner"
src="banner.htm " noresize="nores ize" scrolling="no"
onLoad="bannerF rame=this;" />
..
..
..
When I run this the first alert message gives me the correct name. The
second alert gives me the url of the frameset page, not of the frame page.
Why is this, and how should I modify the script so that I can grab the
document for the frame?
Thanks.
Ken
Comment