Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
//create xmlhttp object for relevant browser type
try{
//older versions of IE
xmlhttp = new ActiveXObject("microsoft.xmlhttp");
}
catch(e){
//all other browsers
xmlhttp = new XMLHttpRequest();
}
//create xml to be submitted over xmlhttp
var sXML = "<xml key='Test' action='save'><Id>"+Id+"</Id><UpdatedBy>"+userid+"</UpdatedBy><Amount>" + newamnt + "</Amount></xml>";
try
{
xmlhttp.open('POST', sURL, false);
xmlhttp.send(sXML);
var sResponse = xmlhttp.responseText;
document.getElementById("result").innerHTML =sResponse;
}
catch(e)
{
document.getElementById("result").innerHTML = e.message;
}
This code is present in the extension object which submits data to ASP page at specified URL. sURL in this case. This is working fine with internet explorer but throwing the error "Filed to execute Send on XMLHttpRequest" on google chrome. Can anybody point me right direction to resolve this. Thanks.
Hi, Abhijit!
I faced the same problem. Did you find the solution?
try {
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://www.qlik.com/", false);
xhr.send(null);
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log(xhr.responseText);
}
}
} catch (e) {
console.error(e);
}
Best regards,
Oleg Orlov
Sounds like Manifest security issue
add
"http : //*/*",
"https : //*/*",
to the permission [Without the spaces]
Hi, Steven! Thank you for reply.
Can you explain the solution in details?
The manifest file controls cross Server/WEB security so you need to tell it which sites are ok. those 2 lines make all site ok to use.
The manifest file should be at the root of your WEB in IIS.
Actual I believe the issue you are haing is the way chrome wants you to use XMLHttpRequest
This link explains better than I