Skip to content

Instantly share code, notes, and snippets.

/*
winkling.js, v1.0.0
@author Ben Poole, http://benpoole.com
Example Javascript for playing with the local Web SQL database
@see http://benpoole.com/weblog/201106302211
*/
// Open / initialise the db - this will fail in browsers like Firefox & IE
var db = openDatabase("winkles", "1.0", "Winkles Of The World", 32678);
@benpoole
benpoole / dbconn.js
Created June 24, 2011 13:26
Example 'factory' for initialising a Web SQL db connection
/* Example 'factory' for initialising a Web SQL database connection
@author Ben Poole http://benpoole.com
@version 1.0.1 for Stack Overflow question: http://stackoverflow.com/questions/6284147
*/
// Sample transaction error callback
var errCallback = function(){
alert("Error");
};
@benpoole
benpoole / websql-example.html
Created June 22, 2011 21:33
Javascript & Web SQL example
<!DOCTYPE HTML>
<html>
<!--
@author Ben Poole, http://benpoole.com
Example HTML5 code for playing with the local WebKit (Opera too?) SQL database.
@see http://benpoole.com/weblog/201106222227
-->
<head>
<meta charset="UTF-8" />
<title>Winkles Of The World Unite!</title>