NS_ERROR_FAILURE with code 0x80004005 when using xmlhttprequest.send

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    NS_ERROR_FAILURE with code 0x80004005 when using xmlhttprequest.send

    Code:
    xmlhttprequest request = ....;
    for(var i=0;i<app_size;i++){
     request.open('GET',url[i],false);
     request.send(null);
    }
    Can anyone explain where my code goes wrong ?
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    from that small piece of code i guess that you overwrite the request-object in every loop step ...

    kind regards

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      can't i re-utilize the xmlhttprequest object? what's the wrong with that?
      one more thing .... what does it mean ..NS_ERROR_FAIL URE?

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        you can but when you loop and always set and start a request with the same variable 'request' it will drop the reference to the 'old' request in every loop step ... you would have to create a new request-object before and might store it in an array or object ...

        NS_ERROR_FAILUR E should be an internal Firefox error that might be thrown from Firefox's xmlHttpRequest handler ...

        kind regards

        Comment

        Working...