By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,947 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,947 IT Pros & Developers. It's quick & easy.

NS_ERROR_FAILURE with code 0x80004005 when using xmlhttprequest.send

dmjpro
100+
P: 2,476
Expand|Select|Wrap|Line Numbers
  1. xmlhttprequest request = ....;
  2. for(var i=0;i<app_size;i++){
  3.  request.open('GET',url[i],false);
  4.  request.send(null);
  5. }
  6.  
Can anyone explain where my code goes wrong ?
Mar 3 '10 #1
Share this Question
Share on Google+
3 Replies


gits
Expert Mod 5K+
P: 5,390
from that small piece of code i guess that you overwrite the request-object in every loop step ...

kind regards
Mar 3 '10 #2

dmjpro
100+
P: 2,476
can't i re-utilize the xmlhttprequest object? what's the wrong with that?
one more thing .... what does it mean ..NS_ERROR_FAILURE?
Mar 4 '10 #3

gits
Expert Mod 5K+
P: 5,390
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_FAILURE should be an internal Firefox error that might be thrown from Firefox's xmlHttpRequest handler ...

kind regards
Mar 4 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.