title: Error processing SQL: TypeError: window.openDatabase is not a function
body: <p>I have some strange issue in my code. i have create simple <code>DB_Function.js</code> to manage JS function inside html page.</p>
  
  <p>i am calling function inside <code>&lt;body onLoad="CALL_DB()"&gt;</code> so first that will initialize the DB and create table if needed.</p>
  
  <p><strong>Issue is here ,</strong></p>
  
  <ul>
  <li>Working : Chrome</li>
  <li>Not Working : Android Mobile &amp; Fire Fox  </li>
  </ul>
  
  <p>Code are as below :</p>
  
  <p><strong>DB_Function.js</strong></p>
  
  <pre><code>function CALL_DB() {
      try {
          alert("call_db");
          var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
          db.transaction(populateDB, errorCB, successCB);
      } catch (err) {
          alert("Error processing SQL: " + err);
      }
  }
  
  
  function populateDB(tx) {
      try {
          alert("call_table");
          tx.executeSql('DROP TABLE IF EXISTS DEMO');
          tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
          tx.executeSql('INSERT INTO DEMO (id, data) VALUES (3, "C")');
          tx.executeSql('INSERT INTO DEMO (id, data) VALUES (4, "K")');
      } catch (err) {
          alert("Error processing SQL: " + err);
      }
  }
  
  
  function errorCB(tx, err) {
      alert("Error processing SQL: " + err);
  }
  
  // Transaction success callback
  
  function successCB() {
      alert("success!");
  }
  </code></pre>
  
  <p><strong>Test.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Storage Example&lt;/title&gt;
  
      &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" charset="utf-8" src="js/DB_function.js"&gt;&lt;/script&gt;
  
    &lt;/head&gt;
    &lt;body onLoad="CALL_DB()"&gt;
      &lt;h1&gt;Example&lt;/h1&gt;
      &lt;p&gt;Database&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is the my <a href="http://jsfiddle.net/Mznr6/" rel="nofollow">JS FIDDLE</a> 
  Please help me i don't know where i am wrong.</p>
  
  <p>Thanks for read my query.</p>