Populate jTable from SQLite (WebSQL) db using jQuery
Thanks. I have finally resolved to use jTable, a jQuery plugin. It comes very handy with ease of implementation. My quest is that I want to create a report from a database table in SQLite (WebSQL). I have seen most of the tutorial focus on server-side implementation, Note that no server-side programming language is involved, only jQuery, HTML5 and SQLite (WebSQL). Good tutorial link to complement the learning speed on how to read data from WebSQL into jTable will be highly appreciated.
This is what I have done so far
- $(document).ready(function () {
- $('#reportsection').jtable({
- title: 'Table of Items',
- paging: "true",
- sorting: "true",
- defaultSorting: "ITEM ASC",
- selecting: "true",
- multiselect: "true",
- selectingCheckboxes: "true",
- selectOnRollClick: "yes",
-
- actions: {
- listAction: '/GettingStarted/PersonList',
- createAction: '/GettingStarted/CreatePerson',
- updateAction: '/GettingStarted/UpdatePerson',
- deleteAction: '/GettingStarted/DeletePerson'
- },
- fields:
- {
- PersonId: {
- key: true,
- list: false
- },
- Name: {
- title: 'ITEM',
- width: '30%'
- },
- Age: {
- title: 'RELATIONSHIP',
- width: '20%'
- },
- RecordDate: {
- title: 'TYPE',
- width: '20%',
- type: 'date',
- create: false,
- edit: false
- },
- Parent:
- {
- title: 'PARENT',
- width: '20%'
- }
-
- }
- });
- });
This is the HTML5 code:
- <div id = "reportsection" class = "reportform" style="width:70%; height:100%; position:absolute; left: 410px; top: 0;">