473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)

I've got the same problem with firefox. My web app works correctly on IE, but in firefox catch an exception like this:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Users/workspace/request.js :: sendRequest :: line 48" data: no]

Expand|Select|Wrap|Line Numbers
  1. # function sendRequest(url,params)
  2. #         {                      
  3. # var http = getXMLHttp();
  4. var response=null;   http.open("GET",url,false);                          http.onreadystatechange=function() {
  5. #               if (http.readyState==4) {
  6. #                        response = http.responseText;
  7. #                                       }
  8. #                                  };    
  9. # http.send();   
  10. # }
  11. #  
  12. #  
  13. # function getXMLHttp() {
  14. #              var xmlhttp = null;
  15. #                 if (window.ActiveXObject) {
  16. #                    if(navigator.userAgent.toLowerCase().indexOf("msie5")!=-1)                  {
  17. #              xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  18. #                     } else {
  19. #              xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  20. #                     }
  21. #                   }
  22. #            if(!xmlhttp&&typeof(XMLHttpRequest)!='undefined') {
  23. #                     xmlhttp = new XMLHttpRequest();
  24. #                   }
  25. #                   return xmlhttp;
  26. #                   }
  27.  
Someone can help me?
Thanks in advance
Ale
Oct 17 '10 #1
1 5504
acoder
16,027 Expert Mod 8TB
Since it's an synchronous request, there's no need for onreadystatechange because the browser will wait for a response before handing back to the script. So, response = http.responseText; can go after the send() call.
Oct 18 '10 #2

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

Similar topics

4
by: robinsand | last post by:
Header File: car.h #if !defined CAR_H #define CAR_H enum TCarType { ctEconomy = 1, ctCompact, ctStandard, ctFullSize, ctMiniVan, ctSUV }; class Car { public: Car();
4
by: Mukesh | last post by:
Hi All I m creating a web application using asp.net 2.0 in VS team foundation server . I m using a dll file "ABC.dll" Whenever I Build the project with code analysis this happens ...
2
by: =?Utf-8?B?TWFyaw==?= | last post by:
I just installed xp professional last night from windows ME and a short time later when I was updating my computer at microsoft update, it froze up. I shut it down, started it back up and when it...
1
by: dev24 | last post by:
Hi all, I am writing a simple method which when entered with an Int parameter performs an sql query, creates a result set, uses that resultset to get values from the object created by another...
6
by: dev24 | last post by:
Hi all, I am writing a simple method which when entered with an Int parameter performs an sql query, creates a result set, uses that resultset to get values from the object created by another...
0
by: boardc3 | last post by:
I am currently building a blog using movable type, which is done in php. at one point I there is a built in tag that returns <p><img alt="..." src="..." w=# h=#> </br> <p> for each image in a series...
5
by: iu2 | last post by:
Hi all, I'm interested in your experience with returned error codes: What's better, return true/false for success/fail, or return 0 for Ok and a negative for failure? This question arose since in...
0
by: friend | last post by:
how to correct the following error? is anybody there to help? i am getting this error from error console . Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location:...
3
dmjpro
by: dmjpro | last post by:
xmlhttprequest request = ....; for(var i=0;i<app_size;i++){ request.open('GET',url,false); request.send(null); } Can anyone explain where my code goes wrong ?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.