Internet Explorer 9, JScript Error c00c023f

Hits: 6838Published: 2011-05-23

IE 9, Ajax and Error c00c023f

After updating to Internet Explorer 9, a previously working ajax driven site of mine stopped working sporadically.

In this short article you will see how to reproduce, and how to solve the problem.

Steps to reproduce

  • Create a XMLHttpRequest object
  • Assign an onreadystatechanged event handler
  • Execute a request
  • Abort the request before the response has been handled
  • You will now see that the readystatechange handler will be called, with the readystate property set to '4'. Any attempt to read the XmlHttpRequest object properties will fail.

If you're not running with a debugger the exception is silent, but can still be annoying. Especially if you're displaying a "loading animation" or anything similar while the request is being executed. The result in my case was that it seemed as the page never stopped loading

Solution

Just before you call the XmlHttpRequest.abort() method, set a flag on it, this is how I did it: XmlHttpRequest.aborted = true;
XmlHttpRequest.abort();

In the onreadystatechanged handler, the first lines of code in my case is:

if (xmlHttpRequest.aborted==true) { 
  stopLoadAnimation();
  return;
}
And that's all there is to it, your Ajax driven site is up and running again.

Be kind, share!


Sponsored

Recent

Facebook Signin using the PHP SDK

Published: 2012-09-18 10:58:30

Have you setup a facebook app and downloaded their sdk, and don't know where to go from there?

Facebook PHP SDK login problem

Published: 2012-09-17 19:34:27

Have you integrated a facebook login to your site, or are you planning to? There's a small bug involving the sign in process that can make your life miserable unless you know how to get around it. Here's one possible solution.

Free Icons and Glyphs for your apps or web sites

Published: 2011-12-20 14:31:57

Why these

Simply put, most graphic resources aren't free if you wish to distribute them with your apps or use them on your sites.

Mind you, I'm no graphic artists and can barely find my way through Paint Shop Pro. The only reason I post these resources is because somewhere, sometime there might be a person who is actually worse than me in producing graphics. These icons and resources are for them.

Use however you wish, whenever you want.

I will add to this article whenever I create new resources for my apps or sites

Facebook Like button shows blank, solution

Published: 2011-03-16 16:32:23

Invisible button

The "EnkelAdress on Facebook" button displayed just fine for a couple of days and then suddenly it showed up blank, no matter how many times trying to copy the code provided by Facebook. After quite some time digging deep in the information jungle we found the solution.

Adding a "Related Sites" button to your site

Published: 2011-03-11 16:24:55

Related Sites

If you have more than one web site and need to attract visitors between your sites this is a good way to do it. If you want an example of what it does, check the button in the lower left corner of your browser. Basically it's a button that will popup a list of sites, in this case it points to different projects and sites related to EnkelAdress.

Facebook Like-button for Geeklog

Published: 2011-03-10 16:54:22

Why integrate facebook

The reason for this is simply put: exposure. Your site link will be exposed to everyone who is friends with a person who have "liked" your page. This is a free, simple and fast way of marketing your site. This guide will focus on how to implement the button in GeekLog with the professional theme applied.

Featured

© EnkelAdress 2008 - 2013   . Privacy Policy: This site uses cookies to provide a more personalized experience. Cookies are also utilized by the ads served on this page, which is beyond our control.