
Originally Posted by
isalento
Hi,
Your code sort of works. It will get the response back correctly but the text just won't be displayed on the device screen.
What you could do is to make GET request asynchronous xhr.open("GET", url, true); and modify the rest of the code to work in asynchronous way.
In addition you could get rid of the IE related xhr stuff at the beginning as it is not needed.
Br,
Ilkka
Hi Ilkka...!!!
Thanks for your answer... My code is actually working on emulator... Besides I've written a simplier function.. Just to get the responseText.. Here the code:
Code:
function getJSON(){
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", 'http://feed.finsat.com.mx/movilesV2/feedindicadores.asp', true);
xhr.onreadystatechange = function(){
if (xhr.readyState == 4) {
if (xhr.status == 200) {
document.getElementById('Noticias').innerHTML= xhr.responseText;
}
else {
document.getElementById('Noticias').innerHTML= "Error code " + xhr.status;
}
}
}
xhr.send(null);
}
It still worknig on emulator, and shows me the JSON that I want... But running the same application at Nokia Browser by url shortener it returns me an Error code 0... 
Perhaps is a bug on Nokia Browser... It worked before the last actualization... :S