Data persistance
With the persistance directive, each change in the data will be sent to a remote URL.
Source code
<html> <script src="https://jspreadsheet.com/v7/jspreadsheet.js"></script> <script src="https://jsuites.net/v5/jsuites.js"></script> <link rel="stylesheet" href="https://jspreadsheet.com/v7/jspreadsheet.css" type="text/css" /> <link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" /> <div id="spreadsheet"></div> <script> var mySpreadsheet = jspreadsheet(document.getElementById('spreadsheet'), { url:'/jspreadsheet/books.json', columns: [ { type: 'autonumber', width: '50px', title: 'Code', name: 'id', readOnly: true, primaryKey: true }, { type: 'text', width: '80px', title:'Image', name:'thumbnailUrl' }, { type: 'text', width: '200px', title:'Title', name:'title' }, { type: 'text', width: '55px', title:'Pages', name:'pageCount' }, { type: 'calendar', width: '90px', title:'Published', name: 'publishedDate' }, { type: 'text', width: '200px', title:'Author', name:'authors' }, { type: 'dropdown', width: '180px', title:'Categories', name:'categories', source:['Internet','Web Development', 'Java', 'Mobile', 'Open Source'], multiple:true }, ], allowComments:true, persistance: '/jspreadsheet/save', updateTable: function(instance, cell, col, row, val, label, cellName) { if (col == 1) { if (! val) { cell.innerHTML = '<img src="https://images-na.ssl-images-amazon.com/images/I/21%2Bwfxx2lyL._SX319_BO1,204,203,200_.jpg" style="width:60px;">'; } else { cell.innerHTML = '<img src="' + val + '" style="width:60px;">'; } } cell.style.overflow = 'hidden'; }, onevent:function() { console.log(arguments); }, license: 'MGIyODE3OGE5NTJiZDU2Yjk3ODNlOGNhZGEyZTI0MjU4MmViODYzZTFiOTI2MTQ2MTBlMmJjOWMyMjQ5NTlmY2U1ZDc3MmUwMTYzMWNiYmJlOWJiOWE0YmNmZTY5ODEyNTk1MTI4Y2JhYzA2ZGQzYzk3YmVmYzUxZmU4MTY5YjQsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTVOalV3TkRBNE1Td2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWQyVmlJaXdpYkc5allXeG9iM04wSWwwc0luQnNZVzRpT2lJek5DSXNJbk5qYjNCbElqcGJJblkzSWl3aWRqZ2lMQ0oyT1NJc0luWXhNQ0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owSWl3aVltRnlJaXdpZG1Gc2FXUmhkR2x2Ym5NaUxDSnpaV0Z5WTJnaUxDSndjbWx1ZENJc0luTm9aV1YwY3lKZExDSmtaVzF2SWpwMGNuVmxmUT09', }); </script> </html>