Changes

Jump to navigation Jump to search
m
no edit summary
Line 21: Line 21:     
   pddb.onsuccess = function() {
 
   pddb.onsuccess = function() {
 +
    var db = pddb.result;
 +
    var tx = db.transaction("MyObjectStore", "readwrite");
 +
    var store = tx.objectStore("MyObjectStore");
 +
    var index = store.index("NameIndex"); 
 +
 
 
     store.put(record);
 
     store.put(record);
  }
     −
  tx.oncomplete = function() {
+
    tx.oncomplete = function() {
    db.close();
+
      db.close();
   };
+
    }; 
}
+
   };
 +
};
    
function recordUpdate(pddbname, record, field, value){
 
function recordUpdate(pddbname, record, field, value){
530

edits

Navigation menu