[Project_owners] Online/Offline

Brian King brian at mozdev.org
Fri Apr 14 23:58:06 EDT 2006


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, but I'm wondering if it is consistent enough to check for 
directly.

Thanks for the tip.
-- 
Brian King
www.mozdev.org - free project hosting for the Mozilla community


More information about the Project_owners mailing list