www.webdeveloper.com
Results 1 to 4 of 4

Thread: javascript, DHTML, and Netscape 6

  1. #1
    Join Date
    Nov 2002
    Posts
    2

    Unhappy javascript, DHTML, and Netscape 6

    Hi Everyone,

    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)
    }

    And you can see the page at http://www.digg.ca/currency_comps/site/eng/index.php

    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.

  2. #2
    Join Date
    Nov 2002
    Posts
    984

    Re: javascript, DHTML, and Netscape 6

    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.
    Last edited by Stefan; 11-27-2002 at 09:41 AM.
    // Stefan Huszics

  3. #3
    Join Date
    Nov 2002
    Posts
    2
    thanks man..

    I've been to devedge and it is a good resource.. but doesn't always have the answers I'm looking for.

    I should pick up a book soon. I've got an older version of the javascript bible, which was great until netscape 6 came out, I need to upgrade my books

    Thanks again man.

    Slán,
    Pat

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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/.

    For a good book on JavaScript see JavaScript: The Definitive Guide by David Flanagan (http://search.barnesandnoble.com/boo...sbn=0596000480)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles