<?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>7967</bug_id>
          
          <creation_ts>2006-03-24 15:15:23 -0800</creation_ts>
          <short_desc>Quirksmode: Cannot assign new properties to the object holding form elements sharing the same name</short_desc>
          <delta_ts>2022-08-09 09:33:49 -0700</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>9610</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Marco Wise">marco.wise</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>ian</cc>
    
    <cc>marco.wise</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37515</commentid>
    <comment_count>0</comment_count>
    <who name="Marco Wise">marco.wise</who>
    <bug_when>2006-03-24 15:15:23 -0800</bug_when>
    <thetext>It looks like IE and Firefox create a Nodelist to store multiple form inputs that share the same name. They allow for properties of this data structure to be set and retrieved. Safari (and Konqueror) seem to use something different (probably a DOMNamedNodesCollection?) that cannot be assigned new properties (adding properties fails silently).

This problem was encountered when using CGI::FormBuilder to build forms with multiple submit buttons. CGI::FormBuilder&apos;s strategy is for these buttons to share the same name (_submit) and their onclick event handler to set _submit.value to the value of the button clicked. This value is retrievable in IE and Firefox, but not Safari and Konqueror.

You can see the behaviour by going to:
http://www.formbuilder.org/ex/multiple_submits.pl
The validation code runs through even if you hit the cancel or delete buttons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37516</commentid>
    <comment_count>1</comment_count>
      <attachid>7289</attachid>
    <who name="Marco Wise">marco.wise</who>
    <bug_when>2006-03-24 15:16:13 -0800</bug_when>
    <thetext>Created attachment 7289
Simplified test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37693</commentid>
    <comment_count>2</comment_count>
    <who name="Marco Wise">marco.wise</who>
    <bug_when>2006-03-27 12:19:27 -0800</bug_when>
    <thetext>It does look like the class used for items with the same name is a DOMNamedNodesCollection, defined in kjs_dom.h.

From Darin: &quot;Looking at DOMNamedNodesCollection::getOwnPropertySlot, it looks like it supports length, indexing by number, and indexing by ID.&quot;

Should it also support setting and getting other properties as a Nodelist in Firefox/IE?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69496</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-02-05 12:50:18 -0800</bug_when>
    <thetext>Comments on IRC suggest this also affects NodeList.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69498</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-02-05 12:52:34 -0800</bug_when>
    <thetext>&lt;rdar://problem/5725722&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69502</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2008-02-05 12:59:32 -0800</bug_when>
    <thetext>I think the issue here is that we create a new collection object every time when a script requests the collection. Setting and getting properties works, but if you re-get the collection you are actually getting a different object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104035</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-01-02 00:07:59 -0800</bug_when>
    <thetext>*** Bug 9278 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104036</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-01-02 00:11:04 -0800</bug_when>
    <thetext>Bug 9278 has a test reduced from a Quirksmode report for accessing form element collections in a slightly different way via HTMLFormElement.elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889996</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-09 09:33:39 -0700</bug_when>
    <thetext>I am unable to reproduce this bug with &quot;Firefox&quot; behavior described in Safari 15.6 on macOS 12.5 because now all browsers return &quot;empty&quot; dialog box upon clicking buttons on the attached test cases.

Since all browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6 on macOS 12.5) are aligned and just show &quot;&quot; / undefined / empty dialog boxes on clicking the buttons rather than as mentioned of showing &quot;One&quot; or &quot;Two&quot; of value, I think this can be marked as &quot;RESOLVED INVALID&quot; because Firefox changed the behavior here where previously it used to show value of button clicked.

Please reopen if I am incorrect. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>7289</attachid>
            <date>2006-03-24 15:16:13 -0800</date>
            <delta_ts>2006-03-24 15:16:13 -0800</delta_ts>
            <desc>Simplified test case</desc>
            <filename>multiple_test.html</filename>
            <type>text/html</type>
            <size>878</size>
            <attacher name="Marco Wise">marco.wise</attacher>
            
              <data encoding="base64">PGh0bWw+Cgk8aGVhZD4KCQk8c2NyaXB0PgogIAkJZnVuY3Rpb24gdmFsaWRhdGUoZm9ybSkgewoJ
CQkJYWxlcnQoZm9ybS5fc3VibWl0LnZhbHVlKTsKCQkJCXJldHVybiBmYWxzZTsKCQkJfQo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