Yes, please share the app, we'll test it on device, but it might take some time. Someone will get back to you with an update.
Yes, please share the app, we'll test it on device, but it might take some time. Someone will get back to you with an update.
app shared, app name "newfrombackup"
thx Marina
Hello Michael, I'll test this.
In JavaScriptpage asset replace myload function with the following:
codefunction myload(varName) {
var arr = localStorage.getItem(varName);
if(arr == null || arr=="") {
arr = new Array();
}
else {
arr = JSON.parse(arr);
}
return arr;
}/code
We added a condition for correct getting an empty value.
The problem is probably in non-initialized localStorage.
Thanks Katya,
replaced myload function, error in console after user registration and login, open addresses page still hangs and the error below
TypeError: options.sort is not a function
options.sort(function(a, b){return a.localeCompare(b);} );
Hi, in JavaScriptpage asset replace myload function with the following:
codefunction myload(varName) {
try {
var arr = localStorage.getItem(varName);
if(arr == null || arr=="") {
arr = [];
} else {
arr = JSON.parse(arr);
if ({}.toString.call(arr) !== "[object Array]") {
arr = [];
}
}
} catch(err) {
arr = [];
}
return arr;
}/code
Hi Marina,
I have replaced js, I got a new error, see screenshot,
this is strange,
register new user and login, when I click save address the error occurs and address is not saved
when I login with an older user that has address saved in db it lets me save new addresses and delete with no error
so the problems seems now to be on new users
tested in browser
In JavaScriptpage asset replace save function with the following:
codefunction save(item, varName) {
try {
var arr = localStorage.getItem(varName);
if(arr == null || arr=="") {
arr = [];
} else {
arr = JSON.parse(arr);
if ({}.toString.call(arr) !== "[object Array]") {
arr = [];
}
}
} catch(err) {
arr = [];
}
arr.push(item);
localStorage.setItem(varName, JSON.stringify(arr))
}/code
One more thing - on Addresses screen in restservice6 in mapping from addresses to variable_name delete JS and add next:
codeif (value == "") {
return "[]"
}
return JSON.stringify(value);/code
Hope this helps.
Perfect Marina,
all working, no errors in browser, working on iphone as tiggzi ipa.
I have to raise my hat to all of you guys,
The A team!
thanks for all your effort on this.
Glad it's working:)