index.js:11 Uncaught TypeError: Cannot read property 'transaction' of undefined
var myDB; //Open Database Connection document.addEventListener("deviceready",onDeviceReady,false); function onDeviceReady(){ myDB = window.sqlitePlugin.openDatabase({name: "mySQLite.db"}); } //Create new table $("#createTable").click(function(){ myDB.transaction(function(transaction) { transaction.executeSql('CREATE TABLE IF NOT EXISTS phonegap_pro (id integer primary key, title text, desc text)', [], function(tx, result) { alert("Table created successfully"); }, function(error) { alert("Error occurred while creating the table."); }); }); });
click
deviceready
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)