salve ragazzi, ho un problemino con questo script, vorrei utilizzarne più di uno nello stesso form, con 1 non ho nessun problema ma se ne inserisco 2 non mi carica più niente.
Dove può essere il problema?
Mettendone 2 ovviamente ho cambiato tutti i vari nomi per non avere doppioni ed errori, ora non ho errori ma non fa nulla
in pratica selezionando il valore di una select mi carica la seconda select,
e nel secondo caso sempre nello stesso form
selezionando una select mi carica i valori di altre 2 selectbox
codice:
var xmlHttpStc
function aggiornaSottoCategorie(str)
{
xmlHttpStc=GetXmlHttpObjectStc();
if (xmlHttpStc==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="pagina_che_mi_crea_la_selectbox.asp";
url=url+"?ct="+str;
xmlHttpStc.onreadystatechange=stateChangedStc();
xmlHttpStc.open("GET",url,true);
xmlHttpStc.send(null);
}
function stateChangedStc()
{
if (xmlHttpStc.readyState==4)
{
document.getElementById("txtHintStc").innerHTML=xmlHttpStc.responseText;
}
}
function GetXmlHttpObjectStc()
{
var xmlHttpStc=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttpStc=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttpStc=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttpStc=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttpStc;
}