to work in browser&ripple must be above - but no work in emulator or real device

to work in browser&ripple must be above - but no work in emulator or real device

  1. <link href="../jquery.mobile-1.2.1/jquery.mobile-1.2.1.min.css" rel="stylesheet" type="text/css">
  2. <script src="../jquery.mobile-1.2.1/jquery-1.8.3.min.js" type="text/javascript"></script>

  3. <script type="text/javascript" src="js/trnotes.js"></script>
  4. <script src="../jquery.mobile-1.2.1/jquery.mobile-1.2.1.min.js" type="text/javascript"></script>
Travel Notes record script:
to work in browser&ripple must be above - but no work in emulator or real device. if i have below work in emulator or real device(and also browser and ripple) the layout but database web sql not created...so script no work. in trnotes.js I have further below initial code... well where web sql code must be so function and layout too function? 

may in an App have more than one database but other folder in App?


  1. <link href="../jquery.mobile-1.2.1/jquery.mobile-1.2.1.min.css" rel="stylesheet" type="text/css">
  2. <script src="../jquery.mobile-1.2.1/jquery-1.8.3.min.js" type="text/javascript"></script>
  3. <script src="../jquery.mobile-1.2.1/jquery.mobile-1.2.1.min.js" type="text/javascript"></script>

  4. <script type="text/javascript" src="js/trnotes.js"></script>

trnotes.js:

  1. // JavaScript Document

  2. $(document).on("mobileinit", function(){
  3.     $.mobile.notesdb1 = openDatabase('trnotes', '1.0', 'Travel Notes', 2*1024*1024);
  4.     $.mobile.notesdb1.transaction(function (t) {
  5.    t.executeSql('CREATE TABLE IF NOT EXISTS notes (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, title TEXT NOT NULL, details TEXT NOT NULL, entered TEXT NOT NULL, updated TEXT, latitude REAL, longitude REAL);');
  6.     });
  7. });

  8. $(document).ready(function(e) {
  9. //$('#home').bind('pageshow', onMapLoad);

  10. $('#home').on('pagebeforeshow', getTitles);
  11. $('#new').on('pageshow', getLocation);
  12. $('#insert').on('submit', insertEntry);
  13. $('#editItem').on('click', editItem);
  14. $('#delete').on('click', deleteItem);
  15. $('#update').on('click', updateItem);
  16. $('#limit').on('click', swapList);
  17. });
  18. ........................
  19. ........................