title: IndexedDB InvalidStateError, windows 8
body: <p>I'm writing a JavaScript/HTML5 Windows 8 app.  I occasionally get a InvalidStateError when writing to the IndexedDB.  My function is below and it happens on the first line.  Is there a way to ensure that the State is correct?</p>
  
  <p>**newEncryptedInfo is a JSON object with 2 string parameters (for the time being).  It is properly formed.</p>
  
  <pre><code>function loadData(evt) {
     var transaction = EncryptedDB.db.transaction("data", "readwrite");
     var encryptStore = transaction.objectStore("data");
     var addResult = encryptStore.add(newEncryptedInfo);
  }
  </code></pre>