I'm trying to get content from a public web page using XMLHttpRequest. The Simulator works fine. But the Emulator and my device both get an error: ABORT_ERR: XMLHttpRequest Exception 102. Any ideas of what's happening? Here's the code:
var url="http://myurl.com"; xmlHttp.overrideMimeType("text/html"); xmlHttp.open("GET", url, false); xmlHttp.onreadystatechange = function() { try { // Checks responseText isn't empty if(xmlHttp.readyState === 4 && xmlHttp.status === 200) { //some code } } catch (err) { writeLog("ERROR IN onreadystatechange: "+err); } }; xmlHttp.send();