Jan 30, 2007 2:38 PM
// Get the value of one of the arguments in the query string
var match = (new RegExp('[?&;]' + name + '=([^&;#]*)')).exec(location.search);
return match ? unescape(match) : "";
Returns an empty string if the name doesn't match.
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.