Bug 14828 - All Javascript that should run after a form has been submitted does not run
Summary: All Javascript that should run after a form has been submitted does not run
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (Intel) OS X 10.4
: P2 Major
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar
: 19444 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-31 10:38 PDT by Stephen
Modified: 2012-09-06 17:30 PDT (History)
3 users (show)

See Also:


Attachments
Test case from Comment #0 (283 bytes, text/html)
2007-07-31 23:25 PDT, David Kilzer (:ddkilzer)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen 2007-07-31 10:38:40 PDT
Once the initial onSubmit JS has been executed, any JS after that will not run (works fine in Firefox, IE6, IE7).  This is specifically more crippling with the introduction of PHP 5.2 and its ability to return fileupload progress information via XMLHTTP Requests.

Steps to reproduce:
1)  Attach an onSubmit function to a form.
2)  In that function set an interval that will run a chunk of code.
3)  The code in the set interval will not execute.

Code example:
<form enctype="multipart/form-data" onsubmit="myFunction()">

function myFunction()
{
  alert('this works');

  myFunctionInterval = setInterval(function()
  {
    alert('this does not work');
  }, 200);
}
Comment 1 David Kilzer (:ddkilzer) 2007-07-31 23:25:26 PDT
Created attachment 15770 [details]
Test case from Comment #0

In the future, please attach test cases to the bug for easier testing.  Thanks!
Comment 2 David Kilzer (:ddkilzer) 2007-07-31 23:28:23 PDT
Confirmed with a local debug build of WebKit r24792 with Safari 3 Public Beta v. 3.0.2 (522.12) on Mac OS X 10.4.10 (8R218).

Both Firefox 2.0.0.6 and Opera 9.21 show both alerts in the test case.

This is not a regression as Safari 2.0.4 (419.3) with its original WebKit behaves the same way as the newer Safari/WebKit.

Comment 3 Mark Rowe (bdash) 2007-08-01 05:41:13 PDT
<rdar://problem/5376648>
Comment 4 Alexey Proskuryakov 2010-11-12 12:13:38 PST
*** Bug 19444 has been marked as a duplicate of this bug. ***
Comment 5 Gavin Barraclough 2012-09-06 17:28:30 PDT
Our behaviour here appears to matches Firefox, Opera, Chrome – if you still see a bug, please attach a new test case that better demonstrates the problem.