fil79
Power Member
Boas
tenho um script(AJAX) que funciona perfeitamente no IE7 mas não no firefox.
Consiste em preencher uma textarea de acordo com o valor escolhido por uma dropdown.
No HTML invoco a função preencheTexto e passo dois argumentos(valor da dropdonw e indice da textarea (com o ID relatorio) a ser preenchida):
O erro dado pela consola de erros do firefox é o seguinte:
Erro: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIChannel.contentType]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"
location: "JS frame :: file:///C:/Program Files/Mozilla Firefox/components/FeedProcessor.js :: FP_onStartRequest :: line 1440" data: no]
Arquivo-fonte: file:///C:/Program Files/Mozilla Firefox/components/FeedProcessor.js
Linha: 1440
Agradeço qualquer ajuda!!
tenho um script(AJAX) que funciona perfeitamente no IE7 mas não no firefox.
Consiste em preencher uma textarea de acordo com o valor escolhido por uma dropdown.
No HTML invoco a função preencheTexto e passo dois argumentos(valor da dropdonw e indice da textarea (com o ID relatorio) a ser preenchida):
Código:
//HTML:
<select name='frases' onChange='preencheTexto(this.value,".$i.")'/>
//AJAX
var xmlHttp;
function preencheTexto(valor,indice)
{
if (valor.length==0)
{
document.getElementById("relatorio"+indice).innerHTML="";
return;
}
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("O seu Browser não permite AJAX");
return;
}
//PÁGINA QUE VAI FAZER UMA QUERY DE ACORDO COM O VALOR SELECCIONADO NA DROPDOWN (q)
var url="gethint.php";
url=url+"?q="+valor;
xmlHttp.onreadystatechange;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
//DEPOIS VAI PREENCHER A TEXTAREA DE ACORDO COM O VALOR DEVOLVIDO PELO SCRIPT GETHINT.PHP
document.getElementById("relatorio"+indice).innerHTML=xmlHttp.responseText;
}
Erro: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIChannel.contentType]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"
location: "JS frame :: file:///C:/Program Files/Mozilla Firefox/components/FeedProcessor.js :: FP_onStartRequest :: line 1440" data: no]
Arquivo-fonte: file:///C:/Program Files/Mozilla Firefox/components/FeedProcessor.js
Linha: 1440
Agradeço qualquer ajuda!!