This works for me on a build from 05/17 on win 2k and on 2002-05-13-08-trunk on win98
Can you please attach the source of the page that contains the iframe?
Created attachment 84335 [details] Page containing the IFrame Attachment requested by vladimire. (I retested with the latest nightly build (2002052008) and had the same failure.
Ok, I saved the page as test.html, added src="test2.html" where test2.html is a page with the script described. When I load test.html it imedeatly submits to the action specified in the script... Oh, wait a second! The testcase worked when I loaded it from the server. However when I load it with the File:// protocol it does not work! Are you loading the testcase with File:// protocol?
No I am loading from a Tomcat JSP server. I will try a small/simple test case & try to reproduce with that.
Created attachment 84371 [details] Simple test script part 2 (redirect) I get the same behavior with these 2 simple example .html pages
Workaround by adding a delay. The following in the redirect script gets around the problem. form = targetDoc.forms; form.action="www.kaz.com.au"; form.target="_top"; setTimeout('form.submit()', 100);
Assignee: alexsavulov → jkeiser
alexandru is this invalid?
Nope, not invalid. I want to disable double form submit protection when JS changes target / action / method / etc.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Summary: submit of parent form from iframe not working → form double submit protection applies even after JS sets src and target
Created attachment 95083 [details] [diff] [review] Patch This patch works, with the minor problem that it crashes on shutdown. I haven't been able to ascertain why.
Comment on attachment 95083 [details] [diff] [review] Patch OK, it turns out that is a general problem with today's builds (backing out doesn't change it), this patch is up for review.
Attachment #95083 - Attachment description: Patch v0.9 (do not apply) → Patch
Created attachment 95156 [details] Testcase The testcases from before don't work at all--they are missing crucial JS functions. The bug is about making form resubmit when you change action= or target= on the form. That is what this testcase does: submit,change action/target,submit again.
Comment on attachment 95083 [details] [diff] [review] Patch aren't you going to declare the methods GetAction and SetAction in the class declaration of nsHTMLFormElement?
I just realized, I really want to check for this in SetAttr().
Created attachment 95672 [details] [diff] [review] Patch v2.0 This version catches SetAttr() so that setAttribute('target') and setAttribute('action') will do the same thing. Also extra comments and some cleanup.
Attachment #95083 - Attachment is obsolete: true
Comment on attachment 95672 [details] [diff] [review] Patch v2.0 r= alexsavulov
Attachment #95672 - Flags: review+
Comment on attachment 95672 [details] [diff] [review] Patch v2.0 sr=jst
Attachment #95672 - Flags: superreview+
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
*** Bug 159770 has been marked as a duplicate of this bug. ***
verifying on build 2003-01-17-04-trunk win2k
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.