function showRecords2() { var firstName2 = document.getElementById('firstName22').value; results4.innerHTML = ''; db.transaction(function(tx4) { //tx.executeSql(selectAllStatement2, [], function(tx, result) { //var firstName2 = document.getElementById('firstName22'); //tx.executeSql('SELECT * FROM Strokes WHERE email = ?', [email], renderResults); // tx4.executeSql('SELECT * FROM Contacts WHERE firstName="Joo" ', [], function(tx4, result4) { tx4.executeSql('SELECT * FROM Contacts WHERE firstName="' + firstName2 + '" ', [], function(tx4, result4) { dataset = result4.rows; // report(result.rows[0].firstName, result.rows[0].lastName); for (var i = 0, item = null; i < dataset.length; i++) { item = dataset.item(i); results4.innerHTML +='
| ' + item['id'] + ' | ' + '' + item['lastName'] + ' | ' + '' + 'Edit -- ' + ' | ' + '' + 'Delete |