Ciao artorius,
oltre a non usare nessuna libreria JS (puro codice scritto a mano che ora ti posto) invio i dati tramite innerHTML.
Questa è la funzione generica per istanziare un oggetto xmlhttp:
codice:
function ajax()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp = new XMLHttpRequest();
return xmlHttp;
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
return xmlHttp;
}
catch (e)
{
try
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
return xmlHttp;
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
che poi richiamo nelle pagine e amplio a seconda delle necessità:
codice:
function caricaMenu(x)
{
//chiamo la funzione ajax che mi restituisce l'oggetto xmlHttp
xmlHttp = ajax();
//e quindi mi scateno con le request
xmlHttp.onreadystatechange = function()
{
if (xmlHttp.readyState == 4)
{
document.getElementById('[ tag a mia scelta]').innerHTML = xmlHttp.responseText;
}
}
xmlHttp.open("POST",x,true);
xmlHttp.send(null);
}