I have a table caseTable
with fields (ID, caseName, date). Each row in that table corr
I do like this ..!!It is working..Thank for help
function getallTableData(tx) {
// tx.executeSql("DROP TABLE IF EXISTS a");
tx.executeSql('SELECT * FROM CaseTable', [], querySuccess, errorCB);
}
function querySuccess(tx, result) {
var len = result.rows.length;
var countDoument=0
$('#folderData').empty();
for (var i = 0; i < len; i++) {
alert(i)
test1=result.rows.item(i).CaseName;
Test1(test1, function(i) {
return function(result_count) {
countDoument = result_count; // here it count value
alert(result_count + "result_count") //alert is correct count value
alert(i + "i");
$('#folderData').append(
'- ' + '' + '' + '
' + result.rows.item(i).CaseName + countDoument + '
' + '' + result.rows.item(i).TextArea + '
' + '' + result.rows.item(i).CaseDate + '
' +'' + i + ''+ '' +
'' + '' + i + ''+ ' '
);
$('#folderData').listview('refresh');
};
}(i));
}
}
function Test1(test, callBack){
var x;
db.transaction(function (tx) {
$yoursql = 'SELECT * FROM "'+test+'" ';
tx.executeSql($yoursql, [], function (tx, results) {
x = results.rows.length + "TableName" + test;
callBack(x);
});
});
}