Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Arrays of objects in localStorage to database

Hi Branden,

Please try converting string to JSON again: prevar obj = jQuery.parseJSON(string);/preAnd share your app please.

Branden
Posts: 0
Joined: Sun Nov 03, 2013 12:10 am

Arrays of objects in localStorage to database

Illya, thank you for your response. I'm out at the moment, but I will share my app as soon as I return to my office (in a few hours). Thank you again for your attention.

Branden
Posts: 0
Joined: Sun Nov 03, 2013 12:10 am

Arrays of objects in localStorage to database

Katya, as I said to Illya just now, I will share the app as soon as I return to my office in a few hours. I will also convert the string to JSON again. Thank you very much for your response and attention.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Arrays of objects in localStorage to database

Branden,

Thank you for the update! Please let us know when you share it.

Branden
Posts: 0
Joined: Sun Nov 03, 2013 12:10 am

Arrays of objects in localStorage to database

Whoa... I may be close to figuring it out. Katya's request for me to convert the string to JSON brought me huge step closer. Turns out I was doing the conversion incorrectly! Returning jQuery.parseJSON(value) does update the database. I might be all set here, but I will reply either way in a little while after I do some more testing.

Thank you so much for your assistance! You guys have been so patient and great!

Branden
Posts: 0
Joined: Sun Nov 03, 2013 12:10 am

Arrays of objects in localStorage to database

All right.. as I stated in my earlier comment, it is working... 95% there with this page. There's one small detail I need to resolve, and I can create separate post if you prefer.

The database gets updated properly (yay!) and then the user is directed to the next page.. where the PREVIOUS values from the database are displayed. I click "refresh" and then the correct/current values appear.

Having seen this behavior in the past, I did the following:
Appery('mobilegrid_8').refresh();

but that didn't fix it. So I tried:

Appery('mobilegrid_8').trigger('create')

but that didn't fix it either.

Am I on the right track? Please let me know if I should create a separate post for this.

Thank you!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Arrays of objects in localStorage to database

Hi Branden,

There is no need to refresh page, seems that you invoke service that gets data from database on Load event. Please try to invoke it on Page Show event.

Branden
Posts: 0
Joined: Sun Nov 03, 2013 12:10 am

Arrays of objects in localStorage to database

That was it! Thank you SO much!!!!!!

Vikram Raju
Posts: 0
Joined: Mon Jul 20, 2015 4:06 am

Arrays of objects in localStorage to database

Can you please explain how to produce the initial array?

Vikram Raju
Posts: 0
Joined: Mon Jul 20, 2015 4:06 am

Arrays of objects in localStorage to database

Can you please explain how to produce the initial array? I need that on for my project....

Return to “Issues”