[Webkit-unassigned] [Bug 23933] New: XMLHttpRequest Breaks on Submit Button Click

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 12 14:06:04 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=23933

           Summary: XMLHttpRequest Breaks on Submit Button Click
           Product: WebKit
           Version: 525.x (Safari 3.2)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Java
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mattv at lakeave.org


Summary: XMLHttpRequest does not send/recieve data when executed following a
Submit button click that triggers server-side behavior.

When an functional XMLHttpRequest is being executed in a loop (successfully),
and a Submit button is clicked that posts to the server (such as with a server
task that takes a very long time to execute), the XMLHttpRequest immediately
stops working, even while the loop continues to be executed.

For instance, this code...

xhr.onreadystatechange = function(){xhrCatch();}
xhr.open("GET",strURL,true);
xhr.send(null);

...works perfectly in any loop until a submit button is clicked. After the
submit button is clicked, each loop will return an exception for xhr.readyState
or xhr.status (as if they were null/undefined). Likewise, xhr.responseText and
xhr.responseXML will also be null... as if the request was either not sent or
not received. However, the function xhrCatch() triggered by
xhr.onreadystatechange will still be executed ONCE after the button click...
but still with the invalid values for responseText, readyState, etc.

This was discovered when attempting to create an Ajax progress bar for a
long-executing task triggered when a Submit button is clicked. The server
writes to an XML file during each loop while AJAX reads from the XML file and
displays the results on the page. Both the server action and the Ajax are
triggered onclick. The progress bar is updated constantly until the task
finishes and the page is redirected (server redirect).

HOWEVER, even if the XMLHttpRequest loop is started on the page load, it will
work absolutely correctly (even if the XML is updated by hand) UNTIL the button
is clicked, at which point it immediately stops working and returns
null/undefined xhr properties.

I've been able to duplicate this on both Windows and OSX versions of Safari
(3.2) as well as Chrome (1.0.154.48), using a number of different combinations
of code event handlers and buttons. Firefox, Opera, and IE work perfectly both
before and after the Submit button is clicked... while with Safari and Chrome
the XMLHttpRequest always stops functioning immediately after a Submit button
is clicked.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list