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>
Created attachment 24925 [details] The example HTML & JavaScript
This appears to work in Safari 5.1
Mihai, should a regression test be landed for this?
(In reply to comment #3) > Mihai, should a regression test be landed for this? It can't hurt.
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).