Salve,
ho bisogno di eseguire un file PHP al termine di una sessione AJAX..
Questo è il codice che ho messo su ma non funziona..!
codice:
function cancellaProdotto(idProdotto, idVendita){ var domanda = confirm("Eliminare il prodotto dalla vendita?");
if (domanda === true) {
$.ajax({
type: "POST",
url: "static/cancellaVendita.php",
data: "idProdotto="+idProdotto+"&idVendita="+idVendita,
dataType: "html",
success: function(risposta){
alert(risposta);
$.ajax({
type: "POST",
url: "static/aggiornaGiacenze.php"
dataType: "html"
});
var form = $('<form action="<?php echo $url_completa; ?>" method="post">' +
'<input type="text" name="password" value="<?php echo $password; ?>" />' +
'</form>');
$('body').append(form);
form.submit();
},
error: function(){
alert("Errore!");
}
})
}
}