Xmo1
09-02-2002, 05:28 AM
I've been writing for MSIE using JS Functions as URL's
<a href="javascript: openhome()">Openhome</a>
which don't work in NetScape. Notice the site is in frames. Most url function calls update two frames. The code is in a file named selector.js located at root, and is accessed using relative references from pages located in a multilevel directory structure. What would be the best solution to get cross browser compatibility? Here's part of my code:
/*get frameset by resolution*/
function openhome() {
var hw
var fname
hw=screen.width
if (hw < 900) {
fname = "/bindex.htm"
} else {
fname = "/aindex.htm"
}top.location.href = fname
}
/* menu */
function opensection() {
parent.frames["content"].location.href = "/section/s-one.htm";
parent.frames["rightmenu"].location.href = "/section/s-right.htm"
}
function openlinks() {
parent.frames["content"].location.href = "/section/business/sb-hrlinks.htm";
parent.frames["rightmenu"].location.href = "/section/business/sb-right.htm"
}
<a href="javascript: openhome()">Openhome</a>
which don't work in NetScape. Notice the site is in frames. Most url function calls update two frames. The code is in a file named selector.js located at root, and is accessed using relative references from pages located in a multilevel directory structure. What would be the best solution to get cross browser compatibility? Here's part of my code:
/*get frameset by resolution*/
function openhome() {
var hw
var fname
hw=screen.width
if (hw < 900) {
fname = "/bindex.htm"
} else {
fname = "/aindex.htm"
}top.location.href = fname
}
/* menu */
function opensection() {
parent.frames["content"].location.href = "/section/s-one.htm";
parent.frames["rightmenu"].location.href = "/section/s-right.htm"
}
function openlinks() {
parent.frames["content"].location.href = "/section/business/sb-hrlinks.htm";
parent.frames["rightmenu"].location.href = "/section/business/sb-right.htm"
}