You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 Android devices (4.2+ and 2.3) and I couldn't get either the window.localStorage API or the simple localStorage API to work between app restarts on either device. Has anyone else experienced this issue?
Here's the little code I have. #contact is a page (I just have one index.html with multiple <div data-role="page" ...> tags.
This worked in the web browser using the window.localStorage API.
var startApp = function() {
$('#contact').live( 'pageshow',function(event){
var contactInfo = localStorage.getItem("contactInformation");
if (contactInfo) {
$.each(contactInfo.split('&'), function (index, elem) {
var vals = elem.split('=');
$("[name='" + vals[0] + "']").val(vals[1]);
});
}
$('#contact-form').on('submit', function () {
var serialized = $(this).serialize();
localStorage.setItem("contactInformation", serialized);
console.log("Contact info saved.");
return true;
});
});
};
The text was updated successfully, but these errors were encountered:
I have 2 Android devices (4.2+ and 2.3) and I couldn't get either the window.localStorage API or the simple localStorage API to work between app restarts on either device. Has anyone else experienced this issue?
Here's the little code I have. #contact is a page (I just have one index.html with multiple <div data-role="page" ...> tags.
This worked in the web browser using the window.localStorage API.
The text was updated successfully, but these errors were encountered: