'Element referenced by ID/Name in global scope. Use W3C standard' warning: NS/Firefox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • senthilkumarmca
    New Member
    • Feb 2006
    • 4

    'Element referenced by ID/Name in global scope. Use W3C standard' warning: NS/Firefox

    Hai!

    I have created two popup window with same name. It works fine in IE.
    But it wont work in Netscape 8.1 and Mozilla 1.5.1.

    Netscape and Mozilla generates warning:Element refrenced by ID/Name in global scope. Use W3C standard.

    Pl solve this issue.

    Thanks
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I don't think you can have 2 pop-up windows with the same name, it breaks the DOM(Document Object Model) specification.

    Because IE is a buggy pile of horse manure it lets you perform this undefined operation Netscape and Mozilla properly raise an error.

    Re-write what you are doing to not create 2 pop-ups with the same name.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by senthilkumarmca
      Netscape and Mozilla generates warning:Element refrenced by ID/Name in global scope. Use W3C standard.
      This warning occurs because a named element or an ID of an element is accessed as a global variable, e.g.
      Code:
      <input id="inputid" name="inputname" ...>
      is accessed as inputid or inputname. It should be accessed using document.getEle mentById("input id") or document.forms[formname].elements["inputname"]. Obviously, that's just an example.

      Comment

      Working...