Jim Rogers

Lives in Baton Rouge, LA, with two dogs, one cat, and one lovely wife. I'm a lead developer for GCR & Associates.

Katrin and Jim

Month List

AJAX status 0 in Sidebar Gadget

by Jim Jan 25, 2007 7:54 AM

My Vista sidebar gadget stopped working after a reboot, and I quickly discovered that the XMLHttpRequest.status was coming back as 0.

There are several reasons that this can happen - in my case it was a bug compounded with running in the sidebar. The bug was sending empty strings for username and password in the open method:

req.open("GET", "http://rpc.bloglines.com/listsubs", true, username, password); 

In a browser (IE7 anyway,) the login fails and a dialog pops up asking for name and password. But the sidebar doesn't ask, and strangely it doesn't fail with a status 401, invalid login. It fails with status 0.

Tags:

Code

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading