I'm having some trouble getting some javascript (controlling dHTML layers) to work in Netscape 4+, IE5, and Netscape 6. It's working fine in Netscape 4+ and IE, but not so much in Netscape 6.
I'm relatively new to this level of javascript programming and this is the first time I've had to develope for Netscape 6 as well as IE and Netscape 4+
Any and all assitance would be most appreciated, includeing info as to where I can find all these W3C standards people talk about when developing for Netscape 6. I've gone to the W3C site but I can't find it anywhere (though I'll be the first to admit that I can be blind and miss even the most obvious of buttons).
Anyway, back to my javascript issue. Here is the javascript I'm using on the page:
var mTimer = ""
function menuShow(divID)
{
if (document.layers) {
document.layers[divID].visibility="show";
} else if (document.all){
document.all[divID].style.visibility="visible";
} else {
document.getElementById(divID).style.visibility="visible";
}
}
function menuHide(divID)
{
if (document.layers) {
document.layers[divID].visibility="hide";
} else if (document.all){
document.all[divID].style.visibility="hidden";
} else {
document.getElementById(divID).style.visibility="hidden";
}
clearTimeout(mTimer)
}
You'll see that when you roll over the main nav it brings up dHTML layers with your options for each nav button. Unfortunately, in Netscape 6, as soon as you try to roll onto a button in the dHTML layers (and off of the main nav button that made the dHTML layer visible) the layers immediately become invisible again.
So.. any and all assitance would be appreciated. Thanks in advance.
Slán,
Pat
Last edited by thatpatguy; 11-27-2002 at 08:35 AM.
Originally posted by thatpatguy
Any and all assitance would be most appreciated, includeing info as to where I can find all these W3C standards people talk about when developing for Netscape 6. I've gone to the W3C site but I can't find it anywhere (though I'll be the first to admit that I can be blind and miss even the most obvious of buttons).
I'll leave answering of the JS question up to people better at JS then myself.
The reason you don't find things about JavaScript on the W3C site is becuse it's not W3C that makes that standard. It's EMCA and the standard is called EMCA-262. http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM
However that standard is a ***** to read and understand so you probably need a good book to teach you JS.
As for websites, one of the best resources for creating crossbrowser standards JS is probably over at Devedge. http://devedge.netscape.com/
In contrast to eg MS they actually provide hints of how to get stuff working in other browsers then their own.
ECMA-262 is only half of the story, though. JavaScript is at its heart a nifty little object oriented scripting language that has nothing to do with web borwsers and various browsers have adapted it by adding objects that relate to the browser. Things like window and document objects. And as one might expect, older browsers impliment those objects differently. The inner layer is defined by the ECMA and the W3C has been working to standardize the outer layer. You can see their work over at http://www.w3.org/DOM/.
Bookmarks