can't update value in IndexedDB
<p>Hi all i need help with my IndexedDB code i have 3 different input fields for 3 objects which i should update (add value to old value) i try to use that code but is not working. I start learnig IDB today but i stack for few hours now with that problem. </p>

<p>it's not update the value, when i add alert(newValue) after request.onsuccess i see proper value in alert box but objectStore.put(request.result) dont update DB. i look in the resources in developer tools </p>

<p><a href="http://i.stack.imgur.com/WX9Vk.jpg" rel="nofollow">alertBox</a>
<a href="http://i.stack.imgur.com/OuDlJ.jpg" rel="nofollow">After alert box</a></p>

<p>My DB looks like:</p>

<pre><code>{id: id1, value1: number, value2: number, value3: number},
{id: id2, value1: number, value2: number, value3: number},
{id: id3, value1: numer, value2: numer, value3: number}]
</code></pre>

<p>each value have own input box</p>

<pre><code>$("#ospAdd").on("keydown",function search(e) {
                if(e.keyCode == 13) {
                    var value1 = $("#ospAdd").val();
                    var id = "osp"


                    var transaction = db.transaction(["data"], "readwrite");
                    var objectStore = transaction.objectStore("data");


                    request = objectStore.get(id);

                    request.onsuccess = function(event){
                        var value1 = $("#ospAdd").val();
                        var oldValue = Number(request.result.value1);
                        var newValue = oldValue + value1;
                        alert(newValue);
                        request.result.value1 = newValue;

                        objectStore.put(request.result);

                    };
                };

            });  
</code></pre>