[Project_owners] Online/Offline

HJ bugs4hj at yahoo.com
Fri Apr 14 16:00:11 EDT 2006


Brian King wrote:
> HJ wrote:
> 
>> var xmlRequest = new XMLHttpRequest();
>> xmlRequest.open("HEAD", aURL, true);
>> xmlRequest.onerror = function(aEvent)
>> {
>>   var request, status;
>>
>>   try {
>>     request = aEvent.target;
>>     status = request.status;
>>   }
>>   catch(ex) {
>>     request = 
>> aEvent.target.channel.QueryInterface(Components.interfaces.nsIRequest);
>>     status = request.status;
>>   }
>>   if (status > ) {
>>     see: 
>> http://lxr.mozilla.org/seamonkey/source/netwerk/base/public/nsNetError.h
>>   }
> 
> The status I code I get is 2152398861. Way off the chart for 
> nsNetError.h, 

That's because the base for these errors is: 2152398848 / 0x804B0000

> but I'm wondering if it is consistent enough to check for directly.

Yes they are.

/HJ


More information about the Project_owners mailing list