i use the below code in order to display a form
notesdb.transaction(function(t) {
t.executeSql('SELECT buildingcode, buildingaddress FROM buildings WHERE buildingcode = ?', [BuildingCode],
function(t, result) {
var rowaddress = result.rows.item(0);
$('#displayflatcomments articleflatcomment').html('Κωδικός: <strong>' + rowaddress.buildingcode + '</strong>');
$('#displayflatcomments articleflatcomment1').html('Διευθυνση: <strong>' + rowaddress.buildingaddress + '</strong>');
});
t.executeSql('SELECT id, BuildingCode, FlatNo, Comment, CommentMore, Closed, New FROM flatcomments WHERE New = 1 ORDER BY BuildingCode ASC', [],
function(t, result) {
var rowcomment = result.rows.item(0);
//alert(rowcomment.id);
$('#displayflatcomments articleflatcomment2').html('Ονομα: <strong>' + rowcomment.Comment + '</strong>');
$('#flatcommentdisplay').val(rowcomment.CommentMore.slice(0, rowcomment.CommentMore.length-16));
$('#paycommentsdelete').click(function(){
t.executeSql('DELETE FROM flatcomments WHERE id = ?', [rowcomment.id]);
$.mobile.changePage('#comments', 'slideup', false, true);
});
$('#sub').unbind('click').click(function(){
});
});
});
I have delete button with paycomentsdelete id.
When I click it i receive Uncaught InvalidError: Failed to execute 'executeSql' on 'SQLTransaction': SQL execution is disallowed.
how can I fix it??