Here's an example of the failure as it happens

http://www.west-wind.com/WestwindWebToolkit/samples/Ajax/AjaxMethodCallbacks.aspx
(go all the way to the bottom click on the Cause a Timeout link)

You need to run with IE debugging on in order to see the failure break
in the debugger on the xhr.readyState is null error.

Interestingly even though the error fires and pops up the debugger
dialog, it appears that the error function in the $.ajax() function
call is still getting fired.

+++ Rick ---



On Sep 11, 11:27 pm, Rick Strahl <rstr...@west-wind.com> wrote:
> Couple of additional pieces of information:
>
> It happens in all versions of IE actually not just standards mode...
>
> Oddly if I step through the code with the IE debugger the code runs
> fine. W/o the debugger bonkage ensues.
>
> onreadystatechange does get called PRIOR to the timeout and xhr is
> fine in those calls. It's only on the actual timeout that faiure
> occurs.
>
> +++ Rick ---
>
> On Sep 11, 8:03 pm, Rick Strahl <rstr...@west-wind.com> wrote:
>
>
>
> > Running into a problem with the $.ajax() function in Internet Explorer
> > 8 in standards mode. It appears that this code:
>
> >                 var onreadystatechange = function(isTimeout){
> >                         // The request was aborted, clear the interval and 
> > decrement
> > jQuery.active
> >                         if (xhr.readyState == 0) {
>
> > bonks on a timeout - the xhr instance is null.
>
> > Line: 3555
> > Error: 'xhr.readyState' is null or not an object
>
> > I only see this behavior in the IE. Works fine in compatibility mode
> > and FF 3.x. Looks like there needs to be a check for xhr before this
> > code fires.
>
> > I'm explicitly setting the timeout to a relatively short value to
> > force a timeout.
>
> > Looking at the code it's not really clear why xhr would ever be null
> > given that it's set in the constructor
>
> > Oddly I have never noticed this behavior before, but today I've spent
> > some time with various error scenarios and this popped up on me.
>
> > Anybody else seeing this?
>
> > +++ Rick ---- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to