Page 1 of 1
Input must be equal to localstorage variable
Posted: Wed Feb 25, 2015 8:13 pm
by Christian7402253
Greetings Appery.io, I have an app that has an event list. by clicking one of the items in the list, a value is stored in the localstorage variable and a popup with input and a button appears. After clicking the button, the input value must match the saved localstorage variable. I can't get it to work and the console says: Uncaught ReferenceError: CODE is not defined. wherein CODE is my variable. Please help me 
Input must be equal to localstorage variable
Posted: Wed Feb 25, 2015 8:15 pm
by Christian7402253
The code is necessary to proceed to the next page.
Input must be equal to localstorage variable
Posted: Wed Feb 25, 2015 8:29 pm
by Evgene Karachevtsev
Hello Christian,
Could you please share print screens of your mapping and events at design tab?
Input must be equal to localstorage variable
Posted: Wed Feb 25, 2015 8:46 pm
by Christian7402253
Hi Evgene thank you for your quick response
I managed to solve it with this:
var input = Apperyio('CODE').val();
var val = localStorage.getItem("Code");
if (input === val) {
Apperyio.navigateTo('Activity', {});
} else {
}
till next time!
Input must be equal to localstorage variable
Posted: Wed Feb 25, 2015 8:48 pm
by Christian7402253
by the way how do I mark this thread as answered?
Input must be equal to localstorage variable
Posted: Wed Feb 25, 2015 8:53 pm
by Evgene Karachevtsev
Christian,
Thank you for the update, glad it works!
To be honest I don't know, perhaps you should contact getsatisfaction to find this out. Usually topic is marked as answered when there is at least one reply from employee, but I don't see this now.