Tags » [csb]

IndexedDB updating a record

Trying to update a records name field but instead of updating the record it creates a new record.

My Code

function editName(e) {
var transaction = db.transaction(["people"],"readwrite");
var store = transaction.objectStore("people");
var request = store.get(5);

request.onsuccess = function(e) {
    var data = e.target.result;
    data.name = "John";

    var objRequest = store.put(data);

    objRequest.onsuccess = function(e){
        console.log('Success in updating record');
    };
}
… 60 more words
Stackoverflow

Lipid-Based Nutrient Supplements Do Not Affect the Risk of Malaria or Respiratory Morbidity in 6- to 18-Month-Old Malawian Children in a Randomized Controlled Trial

by Charles Mangani, Per Ashorn, Kenneth Maleta, John Phuka,Chrissie Thakwalakwa,Kathryn Dewey, Mark Manary, Taneli Puumalainen, and Yin Bun Cheung

from J. Nutr. November 1, 2014… 332 more words

Under-nutrition