Hello,
I have a site that is fully functioning in Chrome/Safari and heavily relied on SQLite to store/access data. However, when testing in Firefox, it errors on the first call, openDatabase(). This is my fairly standard openDB function:
function openDB(){
try {
if (!window.openDatabase) {
alert('not supported');
} else {
var shortName = 'tales';
var version = '1.0';
var displayName = 'Tall Tales Database';
var maxSize = 65536; // in bytes
db = openDatabase(shortName, version, displayName, maxSize);
// You should have a database instance in db.
}
} catch(e) {
// Error handling code goes here.
if (e == 2) {
// Version number mismatch.
alert("Invalid database version.");
} else {
alert("Unknown error "+e+".");
}
return;
}
}
Like I said - openDatabase is undefined when I alert it, and the Unknown error that prints is "unsupported". I assume SQLite is actually supported in Firefox, am I doing something wrong or does it require browser-specific code?
Thank you! Claudia