I found a few posts related to \"phonegap canvas signature\" but they did not help. I have some drop down boxes, text boxes, and one signature field. I want to insert these
You really should be passing error callbacks to transaction() and executeSql() methods - it'll help debugging your database operations in development. You'll want to use something other than alert() for error handling in production.
db.transaction(function(tx) {
// for parts table
tx.executeSql(
"insert into parts(nr,productid,description,toolsVerified) values(?,?,?,?)",
[ nr, productId, desc, tool ],
null, sqlError
);
// for cost table
tx.executeSql(
"insert into costs(nr,date,starttime,endtime,reason,cost) values (?,?,?,?,?,?)",
[ nr, date, startTime, endTime, reason, cost ],
null, sqlError
);
// for sign table
tx.executeSql(
'insert or replace into sign(orderNr,rapport,sign) values (?,?,?)'
[nr, rapport, kundensUnderSkrift],
null, sqlError
);
}, xactError);
function sqlError(tx, err) {
alert("Statement failed: " + err.message);
}
function xactError(err) {
alert("Transaction failed: " + err.message);
}