Tengo un ajax que estaba funcionando bien pero de repente empezo arrojarme errores en mozilla del tipo Component returned failure code: 0x80040111 en la parte del envio de datos POST y no se como solucionarlo.
Este es mi codigo
Código:
Request = function(){ var Request = window.XMLHttpRequest?new XMLHttpRequest():window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):false; Request.fn = function(fn){ if(typeof fn=='string')return new Function(fn); if(typeof fn=='function')return fn; if(typeof fn=='undefined')return new Function(); }; Request.config = { 'xml' : false, '404' : 'File not found' }; Request.success = false; Request.loading = false; Request.error = false; Request.submit = function(obj){ if(Request){ Request.onreadystatechange = function(){ if(Request.status==200){ if(Request.readyState==4){ Response = Request.config['xml']?Request.responseXml:Request.responseText; if(Request.success){ Request.fn(Request.success).call(this, Response, Request); } else { Request.fn(obj.success).call(this, Response, Request); } } else { if(Request.success){ Request.fn(Request.loading).call(this, Request); } else { Request.fn(obj.loading).call(this, Request); } } } else { if(Request.success){ Request.fn(Request.error).call(this, Request.config['404']); } else { Request.fn(obj.error).call(this, Request.config['404']); } }; } Request.open("POST", obj.url, true); Request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'); //esto es para el error 406 de los servidores //Request.setRequestHeader("Connection", "close"); Request.send(null); } else obj.error.call(this, Request); }; return Request; };