Philip TAYLOR wrote:
> An HTML 4.01 (Transitional) web page includes the following JavaScript :
> 
>>     var XHR = new XMLHttpRequest ()
>>     XHR.open("GET", "Resources/Texts/" + text + "s" + "/" + Folio +
>> ".html", false)
>>     alert (XHR.status)
>>         {
>>             XHR.send(null)
>>             document.getElementById ("Text").innerHTML = XHR.responseText
>>         }   
> 
> 
> https://developer.mozilla.org/en/XMLHttpRequest tells me
> that the property "status" exists.
> 
> The error console tells me
> 
>> Error: uncaught exception: [Exception... "Component returned failure
>> code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" 
>> nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame
>> :: http://porphyrogenitus.org/Etheridge/Multifolio/Index-2.html ::
>> SelectText :: line 412"  data: no]
> 
> What am I to infer from this ?  If I remove the
> interrogation of XHR.status, all is well, but
> of course I then cannot tell whether the requested
> resource exists or not.
> 

It has been a while since I used XHR, but iirc the status is unavailable
until you have called send().

-- 
~Justin Wood (Callek)

_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to