tpeck
02-24-2003, 07:18 AM
Hi. I have a frameset with three frames: called top, middle and bottom.
The contents of the bottom frame only work properly in the Explorer browser, so I have an alternative frame with contents that work fine in Netscape.
What I would like is to use javascript to check which browser is loading the frameset and choose the appropriate bottom frame to load.
From my experiments it seems the code should reside between the <head> tags in the bottom frame itself, not the frames page HTML (true?).
I have:
<script language="JavaScript">
//-->
function netscape4() {
var whoAmI = navigator.appName;
var whatAmI = parseInt(navigator.appVersion.charAt(0));
if (whoAmI == "Netscape" && whatAmI == 4) {
top.frames['bottom'].location=(netscapesafe.html');
}
}
// End -->
</script>
<body onload="netscape4()">
I assume it is the ......... top.frames['bottom'].location=(netscapesafe.html'); .......... line which is not working, but I've tried every combination of javascript words known to man, and no swopping in of the correct frame.
What am I doing wrong?
Thanks
Terry
The contents of the bottom frame only work properly in the Explorer browser, so I have an alternative frame with contents that work fine in Netscape.
What I would like is to use javascript to check which browser is loading the frameset and choose the appropriate bottom frame to load.
From my experiments it seems the code should reside between the <head> tags in the bottom frame itself, not the frames page HTML (true?).
I have:
<script language="JavaScript">
//-->
function netscape4() {
var whoAmI = navigator.appName;
var whatAmI = parseInt(navigator.appVersion.charAt(0));
if (whoAmI == "Netscape" && whatAmI == 4) {
top.frames['bottom'].location=(netscapesafe.html');
}
}
// End -->
</script>
<body onload="netscape4()">
I assume it is the ......... top.frames['bottom'].location=(netscapesafe.html'); .......... line which is not working, but I've tried every combination of javascript words known to man, and no swopping in of the correct frame.
What am I doing wrong?
Thanks
Terry