Ciao,

premetto che sono abbastanza nuovo al mondo di AJAX, comunque spulciando qua e là sono riuscito a farmi le mie funzioni JS e ASP per fare uan gestione di categorie contenute in una tabella in un DB.

il tutto si sviluppa all'interno di <div id="risultati"></div>

tutto funziona perfettamente, però se posiziono questo div all'interno dei tag <form></form>
la funzione si impalla e mi viene restituito il seguente errore:

Errore di run-time sconosciuto

posto i codici per chiarezza:
Codice PHP:
var id_contenitore "risultati";

function 
Richiesta(Stringa)
{
    if (
Stringa.length 0)
    {

        
XMLHTTP RicavaBrowser(CambioStato);
        
XMLHTTP.open("get"Stringatrue);
        
XMLHTTP.send(null);
       
//in questo punto si genera l'errore quando questa funzione viene richiamata
       //all'interno dei tag<form></form>
        
return false;
    }
    else
    {
        
document.getElementById(id_contenitore).innerHTML "";
    } 
}




function 
CambioStato()
{
    if (
XMLHTTP.readyState == 4)
    {
        var 
document.getElementById(id_contenitore);
        
R.innerHTML XMLHTTP.responseText;
    }
}

function 
RicavaBrowser(QualeBrowser)
{
    if (
navigator.userAgent.indexOf("MSIE") != (-1))
    {
        var 
Classe "Msxml2.XMLHTTP";
        if (
navigator.appVersion.indexOf("MSIE 5.5") != (-1));
        {
            
Classe "Microsoft.XMLHTTP";
        } 
        try
        {
            
OggettoXMLHTTP = new ActiveXObject(Classe);
            
OggettoXMLHTTP.onreadystatechange QualeBrowser;
            return 
OggettoXMLHTTP;
        }
        catch(
e)
        {
            
alert("Errore: l'ActiveX non verrà eseguito!");
        }
    }
    else if (
navigator.userAgent.indexOf("Mozilla") != (-1))
    {
        
OggettoXMLHTTP = new XMLHttpRequest();
        
OggettoXMLHTTP.onload QualeBrowser;
        
OggettoXMLHTTP.onerror QualeBrowser;
        return 
OggettoXMLHTTP;
    }
    else
    {
        
alert("L'esempio non funziona con altri browser!");
    }


il tag che richiama le funzioni è questo:

Codice PHP:
[url="/includes/admin_cat-inc.asp?tabella=news&amp;operazione=new"]aggiungi o modifica categoria[/url
che può essere?