Results 1 to 2 of 2

Thread: Error: document.getElementById(img) has no properties

  1. #1
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error: document.getElementById(img) has no properties

    Hi Folks!
    This is my first post in this forum so excuse me any incovenience.

    I am getting this error with firefox with the script below:
    Error: document.getElementById(img) has no properties

    HTML: www.rockhour.com.br/preview

    <---------------
    function MostrarMenu(div)
    {
    EsconderTudo();
    menu = "Menu" + div;
    img = "Img" + div;
    img_over = "images/btn_" + div + "_over.gif"
    document.getElementById(img).src = img_over;
    document.getElementById(menu).style.display='';
    }
    function EsconderMenu(div)
    {
    menu = "Menu" + div;
    img = "Img" + div;
    img_out = "images/btn_" + div + "_out.gif"
    document.getElementById(img).src = img_out;
    document.getElementById(menu).style.display='none';
    }
    function EsconderTudo()
    {
    EsconderMenu("festival");
    EsconderMenu("galeria");
    }
    ------------>

    If anyone may help me. Thanks!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I am getting this error with firefox
    I'm not.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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