WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
Bug 22091
Can't submit multiple forms via JavaScript
https://bugs.webkit.org/show_bug.cgi?id=22091
Summary
Can't submit multiple forms via JavaScript
Jamie Raut
Reported
2008-11-05 16:16:39 PST
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. <html> <head> <script type="text/javascript"> function submitBoth() { document.getElementById('form1').submit(); document.getElementById('form2').submit(); } </script> </head> <body> <form id="form1" method="get" target="frame1" action="
http://images.google.com/images
"> <input type="hidden" name="q" value="iced coffee"/> </form> <form id="form2" method="get" target="frame2" action="
http://isiticedcoffeeweather.com/
"> </form> <iframe name="frame1"></iframe><br/> <iframe name="frame2"></iframe><br/> <a href="javascript:submitBoth()">Submit 'em!</a> </body> </html>
Attachments
The example HTML & JavaScript
(647 bytes, text/html)
2008-11-05 16:17 PST
,
Jamie Raut
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jamie Raut
Comment 1
2008-11-05 16:17:30 PST
Created
attachment 24925
[details]
The example HTML & JavaScript
Mihai Parparita
Comment 2
2011-08-23 14:04:59 PDT
This appears to work in Safari 5.1
Alexey Proskuryakov
Comment 3
2011-08-24 11:08:55 PDT
Mihai, should a regression test be landed for this?
Mihai Parparita
Comment 4
2011-08-24 11:12:55 PDT
(In reply to
comment #3
)
> Mihai, should a regression test be landed for this?
It can't hurt.
Mihai Parparita
Comment 5
2011-08-24 11:14:39 PDT
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).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug