Save table row to a cookie or html5 storage -
What I'm going to do is, there is a button on every line in that table, when that click Saves in or the HTML5 webstorage (cookies were my first thoughts, but it seems that webstorage can be a better option). To show me this table, I also want to remove it from the line that it was chosen.
When I or the user end up choosing different rows, then we go to a new page that lists all the data of the cookie or webstorage in the new table.
Thanks
Tohaku, you're not imagining where the data comes from If you have been, will you update / update / save it? But to suggest only the following suggestions.
If this database is coming from the backend server, then simply create the table and add buttons and assign an onclic event to JavaScript with AJAX so that each row can be removed from the database.
How do you remove that line, just enter the class identifier on the TD column, to delete the script, JavaScript has been deleted. You do not need to save because it has already been done in your AJAX request. So there is no need to use any web storage here.
More clarification is needed as the question, but if you have to use web storage, you should use indexed DB, because webstore is lost and no longer maintained. Another reason is that I have also made the entire mobile app on web storage but I found out that this column does not remove the person or it can leave the whole table, but nobody is going to delete the column indexed db There are many issues and support is only in the latest version, but Safari / iOS does not support it, so you also need some Shiva solution.
On the first run, it will fetch all your data from the database, so use javascript to load on the prepared state of the page. Now the function adds a single button to Javascript when the delete is pressed So this line is removed and saved (as there is no correct description, so will be saved in other databases). IndexDB is a nosql database that is based on the object, key storage.
How to do this with IndexDeb
Comments
Post a Comment