Closed Bug 257460 Opened 21 years ago Closed 20 years ago

Dynamically generated form gets submitted twice

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mike_thomas, Assigned: bugzilla)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Form generated in child window using DHTML is submitted twice, once with all fields empty, and a second time with all fields containing their proper values. Reproducible: Always Steps to Reproduce: 1.Open the following HTML in Firefox, after changing the ACTION attribute to an appropriate URL (any old CGI or other script you have handy): <html> <head> <script language="javascript"> function openLookup(){ myWin = window.open("", "child", "width=400,height=200"); myWin.focus(); myWin.document.writeln('<html><body'); myWin.document.writeln('<form name="proxyForm" action="lookupForm.do" method="post">'); myWin.document.writeln('<input type="hidden" name="command" value="INIT">'); myWin.document.writeln('</form></body></html>'); myWin.document.proxyForm.submit(); } </script> </head> <body> <a href="javascript:openLookup()"> TEST </a> </body> </html> 2. Click on the single link. Actual Results: Child window opens and displays output from whatever CGI you configured in. The script on the back end actually gets run twice each time you click the link (use a debugger, or logging to confirm this), and the hidden parameter named "command" is passed only on the first form submission. Expected Results: The dynamically generated form should be submitted only once.
WFM Are you sure that this is not some server side issue?
I'm quite sure this is not a server side issue. The behavior does not occur with other browsers (tried MSIE 6.0, Opera 7.11, Netsape 7.1, all running on WinXP), and I confirmed it on the back end with both a java servlet (my actual development project - Weblogic 8.1 on Solaris) and a perl CGI (a simple CGI I wrote to confirm the problem, running Perl 5.6 on Solaris).
I have also just confirmed that this bug does not manifest itself using Mozilla 1.7.2 on WinXP as a browser.
This bug is old and unconfirmed and therefore very rarely is useful to developpers. Please reopen it if you can reproduce with a recent build and can provide more information.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.