title: update indexedDB data
body: <p>I am trying to update my indexed DB data . what i have done is this..</p>
  
  <pre><code>    function update_doc() {
      var id = document.getElementById("txt_id").value;
      var name = document.getElementById("txt_name").value;
      console.log("About to update " + id + "/" + name);
      var transaction = db.transaction(["stud_store"], "readwrite");
      var store = transaction.objectStore("stud_store");
      var stud = {
          id: id,
          name: name,
          created: new Date()
      }
      var putresult = store.put(stud);
      putresult.onsuccess = function (e) {
          alert("Successfully Done...!");
          console.log("Woot! Did it");
      };
      putresult.onerror = function (e) {
          alert("Something is wrong (Error name: " + e.target.error.name + "  Error message: " + e.target.error.message + ").");
          console.log("Error", e.target.error.id);
          console.dir(e.target);
      }
  }
  </code></pre>
  
  <p>(Where id is unique) I am getting the following error...</p>
  
  <p><img src="https://i.stack.imgur.com/01PY9.jpg" alt="enter image description here"></p>