2
I’m trying to include variables to call a function, but I’m not getting it
function Geral()
{
xmlHttp=GetXmlHttpObject();
var url="pagina.asp?a=1";
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("dados").innerHTML=xmlHttp.responseText;
newTag(dados);
}
}
I did it like this, but it didn’t work:
Geral("pagina.asp?a=1","dados",dados)
function Geral(PAGINA,DADOS,TAG)
{
xmlHttp=GetXmlHttpObject();
var url="PAGINA";
xmlHttp.onreadystatechange=stateChanged(DADOS,TAG);
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged(A,B)
{
if (xmlHttp.readyState==4)
{
document.getElementById(A).innerHTML=xmlHttp.responseText;
newTag(B);
}
}
what is wrong?
thank you very much, attended to my needs.
– SuperMax