How can I get the following JavaScript to return row
so I can access it outside the transaction? All of Apple's example code seems to have HTML written to the browser within the transaction instead of ever passing data back to a calling function.
Along the lines of:
function getData() {
db.transaction(function(tx) {
tx.executeSql("SELECT id FROM table LIMIT 1", [], function(tx, result) {
row = result.rows.item(0);
}, function(tx, error) {
});
});
return row;
}
Is this even possible? Can the Webkit storage API be set to synchronous instead of asynchronous execution?