Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: HTTP Status 0 and Response Text is Undefined in Gadget, but work in IE

15 Mar 2013   #1
MukulGarg

32
 
 
HTTP Status 0 and Response Text is Undefined in Gadget, but work in IE

Hi,

I have tried javascript code to access the Campfire API. It uses the HTTP Basic Authentication method. The code work in IE9, but while running the gadget actually, the AJAX fails, the HTTP status is 0 and response text is empty.

The javascript code is:


Code:
var URL_User = "https://zssd.campfirenow.com/users/me.xml";

if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      
      //xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      $("#response").append("Different Object<br>");
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      

    
    var time1 = new Date().getTime()

    var auth = make_base_auth(usr,passwd);
    
    xmlhttp.open("GET",URL_User,false);
    

    xmlhttp.setRequestHeader('Authentication','OAuth ' + auth);
    xmlhttp.setRequestHeader('content-type','json');
    
    

    xmlhttp.send(null);
    
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        var response = xmlhttp.responseText;
                $("#response").append("<pre>"+response+"</pre>");
                //or something else to be done with response
        }
        else
        {
           
          
               $("#log").append(xmlhttp.readyState+"<br>");
               if(xmlhttp.readyState == 4)
               {
               $("#log").append(JSON.stringify(xmlhttp)+"<br>");
          
               }
        }

Plz help on this


My System SpecsSystem Spec
.

Reply

 HTTP Status 0 and Response Text is Undefined in Gadget, but work in IE




Thread Tools





Similar help and support threads
Thread Forum
Computer Status gadget (Shows no details)
I would like to know what services rely on the Computer Status gadget, because I am following this guide: Sean's Windows 7 Install & Optimization Guide for SSDs & HDDs and somewhere along the line of my optimizations I have lost the display of my HDD's, WiFi, Ram etc in my Computer Status...
Gadgets
Change status bar icons and text
Does anyone know what dll is responsible for the icons and text on the status bar? I'm trying to edit both the icons and text. Here is a picture of what I'm trying to edit. The icon and text are outlined in red. http://i1124.photobucket.com/albums/l562/shoober420/statusbar_zps4a18422f.png I...
Customization
Undefined Network Problem
Hello All Friends I am facing A problem with my network connection after shutting down my pc when i turn it on again it shows me Undefined Network After That when I disable network When I make it again enable it works again please tell me What is the problem with my network either...
Network & Sharing
I lost http connectivity but skype and magicjack work OK
I have lost http (browser only) connectivity. Neither IE 9 nor FireFox 6 nor Chrome can reach any websites, However, MagicJack and Skype work fine which, to me, means that the box's internet protocol is fine. What can I do to fix that problem ?
Network & Sharing
Rivatuner and GPU monitor gadget don't work
I have installed rivatuner. But I don't succeed in shaping to make it work the gadget GPU monitor. In rivatuner, in the window "main" selecting the arrow doesn't appear me the menu with the lens of enlargement. When I make to depart the gadget, here is the error message: ...
Gadgets
Indexer Status Gadget
Does anyone know an alternative site to download the Indexer Status Gadget from BrandonTools. All I get is an error when I try to download it. Sounds interesting and I'd like to try it out. Is there a specific Win 7 alternative?
Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 22:02.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App