thanks max
I can see the clicked items in localstorage now on each click but how do i append to the list and store a Json blob
thanks max
I can see the clicked items in localstorage now on each click but how do i append to the list and store a Json blob
Do you want to store the list as a JSON blob in localstorage?
yes max please.
I dont think i need to stringify as items are text, is this a fair assumption to make max ?
It is text but it's not in JSON format. You would need to convert the entire list into JSON format first.
sorry max.but i have no idea how to do this.
could you give me an example please.thanks
Hi, maybe this can be of use \ help:
Save forms in cookies, local or session storage.
and this:
How to save files locally using Web Storage
If you find it useful, please share alike.
Cheers.
Get all the values of list into an array and then you can use this to convert to convert to JSON string:
code
var myObject = ['item1', 'item2'];
var myJSONText = JSON.stringify(myObject);
/code
Hi, thanks for your kind support. I ́m still in my early learning stages, and I ́ll try that.
Thanks!
Editing, re-saving and deleting items from a list is a very common and basic necessity.Too bad Tiggzi doesn't have a sophisticated grid that has this built in already, with events we can tap into like list-item-select, list-item-delete,list-item-edit and list-item-save. Also events like on-list-item-bound.
Even after reading this I have no idea how to make a list editable. I've placed edit fields above the list and want to click on an item and put the item in the edit fields.Then the item can be saved and the list reloaded. or in-line editing would be good too but then the labels displaying fields would have to change to textboxes nad checkboxes etc. Seems common but sophisticated things like this need a set of tutorials to show how to do them in detail.