XMLHttpRequest is not working on chrome version 23 & above

6,823 views
Skip to first unread message

Kiran Bhalerao

unread,
Feb 14, 2013, 1:18:16 AM2/14/13
to chromium-...@chromium.org
Hi,
     I have created the chrome extension & added the .crx file into chrome extension section.This .crx file was created using javascript & manifest.json files.From java script,i am giving XMLHttpRequest to my java servlet  after every 10 sec time interval.I have tested this on chrome version 18 &19,it working properly but when i am trying to add .crx file in chrome version 23 the XMLHttpRequest not working.
 The javaScript code is :- 
                try{
      
var xmlhttp;
if (window.XMLHttpRequest){
 xmlhttp=new XMLHttpRequest();
 }
else{
 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
 }
xmlhttp.onreadystatechange=function()
 {
 if (xmlhttp.readyState==4 && xmlhttp.status==200){
  /* document.getElementById("myDiv").innerHTML=xmlhttp.responseText;*/
  // alert(xmlhttp.responseText);
 if(xmlhttp.responseText!="?"){
 chrome.browserAction.setBadgeText({text : xmlhttp.responseText});
 chrome.browserAction.setIcon({path:"images/IconGreen.png"});
 chrome.browserAction.setBadgeBackgroundColor({color : [ 208, 0, 24, 255 ]});
 }
 else{
 chrome.browserAction.setBadgeText({text :"?"});
 chrome.browserAction.setIcon({path:"images/IconGrey.png"});
     chrome.browserAction.setBadgeBackgroundColor( {color:[190, 190, 190, 230]});
 }
   }
 };
xmlhttp.open("GET"," http://127.0.0.1:8888 /engile/realTimeUpdateCountServlet",true);
xmlhttp.send();
} catch (err) {
alert(err.message);

}

Please give me any suggestion on it.
Message has been deleted

Sungguk Lim

unread,
Feb 16, 2013, 12:11:21 PM2/16/13
to chromium-...@chromium.org
Did you check error message on Chrome Dev Tools?

2013년 2월 14일 목요일 오후 3시 18분 16초 UTC+9, Kiran Bhalerao 님의 말:

Sungguk Lim

unread,
Feb 16, 2013, 2:21:09 PM2/16/13
to chromium-...@chromium.org
I think this is the solution 
http://stackoverflow.com/questions/11375729/xmlhttprequest-not-working-in-google-chrome-packaged-web-app?rq=1



2013년 2월 17일 일요일 오전 2시 11분 21초 UTC+9, Sungguk Lim 님의 말:
Reply all
Reply to author
Forward
0 new messages