mercredi 1 avril 2015

Show alert after each function that contains tx.executeSql

Hi I have this code in javascript:



db.transaction(function (tx) {
tx.executeSql('DELETE FROM table');
var querys = texto.split('\n');
$.each(querys, function(i,elem) {
tx.executeSql(querys[i],[],null,null);
});
alert("DATA LOADED");
});


but my problem is that the alert is displayed before the tx.executeSql process has not finished inserting records... please help me!!!


Aucun commentaire:

Enregistrer un commentaire