Need proper syntax

I am using this button to insert data into a storage database:

<div class="bookmark"><input type="button" class="addBM" value="Add Bookmark" onclick="insertRow('100', window.location.pathname, document.title)"></div>

However, although the rows are being inserted, all the data is undefined. Here is the insert statement:

function insertRow() {
db = window.openDatabase("Database", "1.0", "Bookmarks", 200000);
db.transaction(function(tx) {
	var id;
	var filename = window.location.pathname;
	var title = document.title;
	tx.executeSql("insert into BOOKMARKS(id, filename, title) values(?,?,?)",[id, filename, title]);
	}, errorCB,successCB()); alert('Bookmark added.');

What’s the proper syntax to carry the data to the DB? There are no errors in the console, and the alert pops up at the right time.

How about using the errorCB to show any errors that occur?

function errorCB(tx, err) {
   alert('Error processing SQL: ' + err);

I’ve been using:

function errorCB(err) {
console.log("Error processing SQL: "+err.code);

That could be why the problem then.

The webdatabase specs show that the error callback has two parameters, the first being the transaction object, and the second being the error.

I do believe you nailed it, I see the words now! Now I’ve got to work on the Delete Row button, next, with its Unexpected token: } error.

Thanks so much, Paul!