<?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>22091</bug_id>
          
          <creation_ts>2008-11-05 16:16:39 -0800</creation_ts>
          <short_desc>Can&apos;t submit multiple forms via JavaScript</short_desc>
          <delta_ts>2011-08-24 11:14:39 -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>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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>
          
          <blocked>39021</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Jamie Raut">jamieraut</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>mihaip</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97753</commentid>
    <comment_count>0</comment_count>
    <who name="Jamie Raut">jamieraut</who>
    <bug_when>2008-11-05 16:16:39 -0800</bug_when>
    <thetext>Simple page, two iframes, two forms, each form targets an iframe. Trying to submit both forms simultaneously via JavaScript will result in only the first form being submitted, the second submit is ignored apparently.

The below functions as expected in Firefox 3.0.3 on Mac Intel OS X 10.5. The second form submission fails when tested on the webkit nightly build from Nov 4 2008 (Version 3.1.2 [5525.20.1] in About Safari...), same OS/platform.

&lt;html&gt;
  &lt;head&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
      function submitBoth() {
          document.getElementById(&apos;form1&apos;).submit();
          document.getElementById(&apos;form2&apos;).submit();
      }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;form id=&quot;form1&quot; method=&quot;get&quot; target=&quot;frame1&quot; action=&quot;http://images.google.com/images&quot;&gt;
	  &lt;input type=&quot;hidden&quot; name=&quot;q&quot; value=&quot;iced coffee&quot;/&gt;
    &lt;/form&gt;
    &lt;form id=&quot;form2&quot; method=&quot;get&quot; target=&quot;frame2&quot; action=&quot;http://isiticedcoffeeweather.com/&quot;&gt;
    &lt;/form&gt;
    &lt;iframe name=&quot;frame1&quot;&gt;&lt;/iframe&gt;&lt;br/&gt;
    &lt;iframe name=&quot;frame2&quot;&gt;&lt;/iframe&gt;&lt;br/&gt;
    &lt;a href=&quot;javascript:submitBoth()&quot;&gt;Submit &apos;em!&lt;/a&gt;
  &lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97754</commentid>
    <comment_count>1</comment_count>
      <attachid>24925</attachid>
    <who name="Jamie Raut">jamieraut</who>
    <bug_when>2008-11-05 16:17:30 -0800</bug_when>
    <thetext>Created attachment 24925
The example HTML &amp; JavaScript</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455693</commentid>
    <comment_count>2</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2011-08-23 14:04:59 -0700</bug_when>
    <thetext>This appears to work in Safari 5.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456212</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-08-24 11:08:55 -0700</bug_when>
    <thetext>Mihai, should a regression test be landed for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456227</commentid>
    <comment_count>4</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2011-08-24 11:12:55 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Mihai, should a regression test be landed for this?

It can&apos;t hurt.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456229</commentid>
    <comment_count>5</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2011-08-24 11:14:39 -0700</bug_when>
    <thetext>Actually, I think http://trac.webkit.org/browser/trunk/LayoutTests/fast/events/popup-when-select-change.html is already testing for this (onpopup is submitting two forms, each targetted at a different iframe).</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>24925</attachid>
            <date>2008-11-05 16:17:30 -0800</date>
            <delta_ts>2008-11-11 09:00:17 -0800</delta_ts>
            <desc>The example HTML &amp; JavaScript</desc>
            <filename>test2.html</filename>
            <type>text/html</type>
            <size>647</size>
            <attacher name="Jamie Raut">jamieraut</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgPGhlYWQ+CiAgICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CiAgICAg
IGZ1bmN0aW9uIHN1Ym1pdEJvdGgoKSB7CiAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJ
ZCgnZm9ybTEnKS5zdWJtaXQoKTsKICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdm
b3JtMicpLnN1Ym1pdCgpOwogICAgICB9CiAgICA8L3NjcmlwdD4KICA8L2hlYWQ+CiAgPGJvZHk+
CiAgICA8Zm9ybSBpZD0iZm9ybTEiIG1ldGhvZD0iZ2V0IiB0YXJnZXQ9ImZyYW1lMSIgYWN0aW9u
PSJodHRwOi8vaW1hZ2VzLmdvb2dsZS5jb20vaW1hZ2VzIj4KCSAgPGlucHV0IHR5cGU9ImhpZGRl
biIgbmFtZT0icSIgdmFsdWU9ImljZWQgY29mZmVlIi8+CiAgICA8L2Zvcm0+CiAgICA8Zm9ybSBp
ZD0iZm9ybTIiIG1ldGhvZD0iZ2V0IiB0YXJnZXQ9ImZyYW1lMiIgYWN0aW9uPSJodHRwOi8vaXNp
dGljZWRjb2ZmZWV3ZWF0aGVyLmNvbS8iPgogICAgPC9mb3JtPgogICAgPGlmcmFtZSBuYW1lPSJm
cmFtZTEiPjwvaWZyYW1lPjxici8+CiAgICA8aWZyYW1lIG5hbWU9ImZyYW1lMiI+PC9pZnJhbWU+
PGJyLz4KICAgIDxhIGhyZWY9ImphdmFzY3JpcHQ6c3VibWl0Qm90aCgpIj5TdWJtaXQgJ2VtITwv
YT4KICA8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>