Reputation: 1996
I don't want to set up a database, because all I need to do is store a number from a textbox so that when my app starts, it'll check:
I need to allow the user to change this number in the textbox and have that persist when the user exits the app and fires it up again.
Any direction? Thanks in advance.
Upvotes: 0
Views: 71
Reputation: 22770
This is essentially a web app right?
You use local storage if it is.
if (localStorage.getItem('storeId') == null) {
$.mobile.changePage("#pageLocation");
$("#suburbSelect a").click(function (element) {
localStorage.setItem('storeId', $(this).attr('storeId'));
$.mobile.changePage("#page2");
});
}
The above is jQuery code and localStorage is a HTML 5 thing.
Upvotes: 2