<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>6006</bug_id>
          
          <creation_ts>2005-12-08 03:57:59 -0800</creation_ts>
          <short_desc>document.getElementById does not behave in the same way as Internet Explorer (Win)</short_desc>
          <delta_ts>2019-02-06 09:02:47 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Wellington">andrew</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>ian</cc>
    
    <cc>jason.hu</cc>
    
    <cc>rniwa</cc>
    
    <cc>zcorpan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>25710</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Wellington">andrew</who>
    <bug_when>2005-12-08 03:57:59 -0800</bug_when>
    <thetext>In Internet Explorer, document.getElementById() in JavaScript will return form elements (input, select, etc) 
but not other elements (p, div, etc) with the same name as the id being requested (even if their id is 
different to the name). This causes some IE-specific JavaScript to fail on Safari as it (rightly according to 
the specifications) ignores the name when finding the elements requested.

An affected product is the eService administration interface from Right Now software (http://
www.rightnow.com/eservice.html) although this interface does claim to only support IE 5.5+.

A sample test case will be attached to this bug shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25711</commentid>
    <comment_count>1</comment_count>
      <attachid>5000</attachid>
    <who name="Andrew Wellington">andrew</who>
    <bug_when>2005-12-08 03:59:27 -0800</bug_when>
    <thetext>Created attachment 5000
Simple demonstration page</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25713</commentid>
    <comment_count>2</comment_count>
    <who name="Andrew Wellington">andrew</who>
    <bug_when>2005-12-08 04:09:37 -0800</bug_when>
    <thetext>To clarify, when IE walks the tree looking for elements that match the document.getElementById() request, 
it returns the first element that matches:
  - id is equal to requested id
  - element is a form element, and its name matches the requested id
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28692</commentid>
    <comment_count>3</comment_count>
    <who name="Gavin Kistner">gavin</who>
    <bug_when>2006-01-17 07:27:02 -0800</bug_when>
    <thetext>If any such broken behavior is introduced, it should be only exist in some alternative &apos;compliant&apos; mode. IE 
is simply wrong, and steadily losing market share. Suggest you change this bug to invalid.

(Some believe that &apos;de facto&apos; standards present in other browsers are more important than the Standards 
themselves. I believe the opposite. Matching the spec instead of IE is not a &apos;bug&apos;. I accept that there are 
people with both opinions; I do not know which opinion drives Safari&apos;s development team.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60589</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-11-07 13:03:10 -0800</bug_when>
    <thetext>*** Bug 15127 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60590</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-11-07 13:04:08 -0800</bug_when>
    <thetext>From bug 15127:

Opera has this quirk, but is apparently going to remove it from their 9.50 release:

&quot;Removed IE-compatibility where Document.getElementById treated name and id
attributes the same, which caused problems with jQuery.&quot;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62269</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-11-25 02:49:21 -0800</bug_when>
    <thetext>This causes major problems at the site of Beeline, a major mobile provider in Russia. Affected pages are only available to customers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65419</commentid>
    <comment_count>7</comment_count>
    <who name="Anantha Keesara">anantha</who>
    <bug_when>2007-12-27 17:58:05 -0800</bug_when>
    <thetext>&quot;http://markets.themarker.com/tmc/investorGuide.jhtml?layer=investorGuide&quot; (a major Israeli finance portal also has this issue)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100396</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2008-11-26 04:10:14 -0800</bug_when>
    <thetext>Is this still an issue?

# [13:14] &lt;zcorpan&gt; it seems we have lots of bugs saying that getElementById works with name=&apos;&apos;
# [13:14] &lt;zcorpan&gt; which we dropped in 9.5
# [13:15] &lt;zcorpan&gt; and no bugs on it not working with name=&apos;&apos;, afaict
# [13:15] &lt;zcorpan&gt; also, i think ie8 doesn&apos;t look at name=&apos;&apos; (in ie8 mode)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1133791</commentid>
    <comment_count>9</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2015-10-16 00:58:22 -0700</bug_when>
    <thetext>This is no longer the case with newer versions of IE (e.g. IE9).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502844</commentid>
    <comment_count>10</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:02:47 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>5000</attachid>
            <date>2005-12-08 03:59:27 -0800</date>
            <delta_ts>2005-12-08 03:59:27 -0800</delta_ts>
            <desc>Simple demonstration page</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>530</size>
            <attacher name="Andrew Wellington">andrew</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8dGl0bGU+QnJva2VuIGluIHRoYXQgSUUgV2F5PC90aXRsZT4KPC9oZWFk
Pgo8Ym9keT4KPHA+CklmIHdlJ3JlIGJyb2tlbiBsaWtlIElFLCB0aGUgZm9sbG93aW5nIGZpZWxk
IHdvdWxkIGNvbnRhaW4gIkJyb2tlbiBsaWtlIElFIi4KTm90ZSB0aGF0IGV2ZW4gdGhvdWdoIHRo
ZSBpZCBkb2Vzbid0IG1hdGNoIHRoZSByZXF1ZXN0ZWQgaWQsIElFIHRoaW5rcyB0aGF0IGl0CmNh
biBtYWtlIGl0IHVwIG9uIHRoZSBmbHkuIEN1dGUuCjwvcD4KPHA+ClZlcmlmaWVkIHRoaXMgaXMg
YnJva2VuIG9uIElFIDYgU1AyCjwvcD4KPGlucHV0IHR5cGU9InRleHQiIG5hbWU9InRlc3RFbGVt
ZW50IiBpZD0ic29tZXRoaW5nRWxzZSI+CjxzY3JpcHQgbGFuZ3VhZ2U9IkphdmFTY3JpcHQxLjEi
IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CnZhciBlbGVtOwplbGVtID0gZG9jdW1lbnQuZ2V0RWxl
bWVudEJ5SWQoInRlc3RFbGVtZW50Iik7CmVsZW0udmFsdWUgPSAiQnJva2VuIGxpa2UgSUUiOwoK
PC9zY3JpcHQ+CjwvYm9keT4=
</data>

          </attachment>
      

    </bug>

</bugzilla>