Code compatible to Mozilla

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • guru007
    New Member
    • Nov 2007
    • 6

    Code compatible to Mozilla

    Hi, my code document.getEle mentById("QQ" + i).checked = false;

    is working in internet explorer , however its giving error in mozilla browser

    Error: document.getEle mentById("QQ" + i) has no properties
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Show the rest of the code. Have you set the ID correctly?

    Comment

    • Dasty
      Recognized Expert New Member
      • Nov 2007
      • 101

      #3
      Originally posted by acoder
      Show the rest of the code. Have you set the ID correctly?
      Exactly what acoder said. Dont forget that "QQ" + i should be the id of element - not its name. I bet your problem is right there (that you are using name instead of id), bacause in IE, getElementById returns elements not only by id, but even elements with given name (which is invalid). That's why it works in IE and not in Mozilla.

      Comment

      Working...