Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts

    NS, IE6, IE7, Mozilla? What standards?

    While looking through the code that has been written by sime of you gurus I see a lot of "if (ie4||ie5||ns5)" and the liked to access the elements in a document. Now that there is IE7 and, no doubt, several other upgrades in NS how do you find out what changes need to be made to code? What references do you guys use to see if what you write will be OK? I tried to run NS on my computer but it never did work right so I uninstalled it.

    I use the reference in the w3c DOM but I kknow I have written questions here asking "why doesn't this work..." when I have tried addressing elements and it must have to do with the variation in the w3c DOM and ie6 or ie7.
    Scott Stewart
    Always happy to learn from pros.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    A lot of us don't support any IE browser lower than version 5.5. I think the best method is to test for a certain object. The IE6 and IE7 dom are pretty similar. Its JS engine might support a little more modern functions not sure.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,616
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Quote Originally Posted by ScottInTexas View Post
    While looking through the code that has been written by sime of you gurus I see a lot of "if (ie4||ie5||ns5)" and the liked to access the elements in a document.
    You will only find code like that in long outdated scripts and those written by newbies who haven't learnt JavaScript properly yet. Modern JavaScript coding uses feature sensing to test if the browser supports the code you are using regardless of which browser it is. The only time any form of browser detection is used is to test for Internet Explorer for those instances where JScript insists on a different version of a statement from that used by JavaScript and where there is no feature that can be tested for as both JScript and JavaScript support the feature - just in different ways.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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