domenica 1 luglio 2012

Ajax e JQUERY

Esempio di script che esegue una richiesta ajax a un file php, inviando il dato id=1 come get.

$.ajax({
    url : "indirizzo assoluto.php",
    type: "GET",
    data: "id=1",
    success : function (data,stato) {
        $("#output").html(data);
    
    },
    error : function (richiesta,stato,errori) {
        alert("E' evvenuto un errore. Il stato della chiamata: "+stato);
    }
});

Nessun commento: