Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
I am able get Item by id. But how to update the item ?


using the following code i am getting value
JavaScript
var transaction = db.transaction("Emp", IDBTransaction.READ_WRITE);
                var objectStore = transaction.objectStore("Emp");

                var request = objectStore.get(id);                
                request.onsuccess = function(evt) {  
                //alert(request.result.Name);
                if(request.result)
                {                
                $('#txt_1').val(request.result.Name);
                $('#txt_2').val(request.result.Cname);
                 $('#txt_3').val(request.result.Salary);
                 $('#txt_4').val(request.result.Address);
}
}


if i want to change Salary of that particular record. how to do it
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900