我想使用Cordova / phonegap填充多个下拉菜单,但是下面的交易代码无法正常执行。
只有第一种下拉方法在跳过休息时才能正确执行。
prefix:WriteToFill
的函数是将结果附加到相应下拉列表的函数。
请建议我如何填写所有下拉列表。
initializeDropdown: function (callback) {
var self = this;
this.db = window.openDatabase("DemoDB", "1.0", "Demo DB", 4 * 1024 * 1024);
this.db.transaction(function (tx) {
var sql = "select M_ID,M_name from Tbl_Manager";
tx.executeSql(sql, [], function (tx, results) {
debugger;
WriteToFillManager(results);
});
var sql2 = "select CC_ID,CC_NAME from Tbl1";
tx.executeSql(sql2, [], function (tx, results2) {
debugger;
WriteToFillTbl1(results2);
});
var sql3 = "select C_ID,C_NAME from Tbl_cust";
tx.executeSql(sql3, [], function (tx, results3) {
debugger;
WriteToFillCustomer(results3);
});
var sql4 = "select CURRENCY_ID,CURRENCY_CODE from Tbl_Currency";
tx.executeSql(sql4, [], function (tx, results4) {
debugger;
WriteToFillCurrency(results4);
});
});
},