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 4 of 4

Thread: getelementbyid

  1. #1
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    415
    Thanks
    4
    Thanked 5 Times in 4 Posts

    getelementbyid

    is getelementbyid only for intermet explorer? if not, which browsers support it?

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    getElementById (the casing is important when in use) is supported by all modern browsers. In general terms that means MSIE5+, NN5/6+, Opera, Mozilla, Firefox, Safari and other browsers developed during the lifespan of those browsers.

  • #3
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    This question was asked only a few days ago.....http://www.codingforums.com/showthread.php?t=59888

    Jamie.

  • #4
    Regular Coder
    Join Date
    May 2005
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah getElementById is cross browser.

    i think www.w3schools.com has a list of functions and their browser support

    you could also do:
    if(function){
    to test if a browser suports that function:

    if(getElementById){
    //suports getElementsById
    }else{
    //does not support this function



  •  

    Posting Permissions

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