Hello! I'm trying to develop an extension that retrieves messages from a blog, but I receive a strange error at httprequest. The request is executed because readystate = 4 but the responsetext is empty and status is null. I post my code here:
function s1(){ var url = "http://www.cirip.ro/php/firefox/mesajev2.php?"; url+="user="+document.getElementById("login").value; url+="&pass="+document.getElementById("pass").value; url+="&lang=RO"; ajax(url); } var httpRequest = null; function ajax(url){ httpRequest = new XMLHttpRequest(); httpRequest.open('GET', url, true); httpRequest.onreadystatechange = infoReceived; httpRequest.send(''); } function infoReceived(){ var output = httpRequest.responseText; if (httpRequest.readyState == 4){ document.getElementById("signin").style.visibility = "hidden"; document.getElementById("workspace").style.display = ""; } } Could anyone tell me what the problem is. The url used by ajax function is corect because if I put it directly in the browser the messages appear. So I really don't have an idea what is the matter with responsetext. Any help is welcome. Thanks! Ildi
-- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.