jQuery promise deferred
<p>Inspired by <a href="http://www.bennadel.com/blog/2274-jQuery-Can-Provide-Queue-Based-Promise-Objects.htm" rel="nofollow">Ben Nadel's post</a>, I thought I would use .promise() with asynchronous commands.
Here's what I've got so far, but it 1) it doesn't work, 2) it could be improved even if it did work.</p>

<pre><code>var dbo = openDatabase('dbName','1.0','Description goes here', 1048576);

console.log(jQuery.fn.jquery); // 1.7.1
var myPromise1 = dbo.transaction(function(myTrans) {
    myTrans.executeSql('drop table myTable;');
}).promise();
myPromise1.done(function() {
    var myPromise2 = dbo.transaction(function(myTrans) {
        myTrans.executeSql(
            'CREATE TABLE IF NOT EXISTS myTable' 
            + '(FieldID Integer NOT NULL PRIMARY KEY'
            + ',FieldName Text'
            + ');'
        );
    }).promise();
    myPromise2.done(function() {
        dbo.transaction(function(myTrans) {
            myTrans.executeSql("INSERT INTO myTable(FieldID,FieldName) VALUES(1,'A'");
            myTrans.executeSql("INSERT INTO myTable(FieldID,FieldName) VALUES(2,'B'");
            myTrans.executeSql("INSERT INTO myTable(FieldID,FieldName) VALUES(3,'C'");
        });
    });
});
</code></pre>

<p>I'm trying to not use callbacks.  Maybe I should put the .promise() in the callback parameter position.</p>
