I use a jquery post to send data to a simple php page:
$( "body" ).on( "keyup", ".attribuzioneabbonamento", function(){
var AbbonamentoCodice = $(this).val();
var IdRiga = $(this).attr('dd');
if(AbbonamentoCodice.length == 13){
$.post("engine.php",
{
Action: 'attribuisciabbonamento',
Code: AbbonamentoCodice,
IdRiga: IdRiga
},
function(data, status){
if(status == 'success'){
$('.abbonamentorisposta'+IdRiga).html(data);
}else{
}
});
}
});
It works, but the problem is that every time the post is executed 2 times.
Why is it called 2 times?