il codice lo puoi chiamare così:

<input type = "submit" name = "pulsante" onclick = "attiva(); return false;" />

mentre il codice l'ho sistemato così:
codice:
function attiva()
{
    var http = new XMLHttpRequest();

    http.open("GET", "a.aspx?ajax_comando=1" + "&t=" + new Date().getTime(), true);
    http.send(null);

    http.onreadystatechange = function ()
    {
        if (http.readyState == 4 && http.status == 200)
        {
            document.getElementById("div1").innerHTML = http.responseText;
        }
    }

}
ma ti sconsiglio di usarlo