Christian7402253
Posts: 0
Joined: Wed Feb 25, 2015 8:13 pm

Input must be equal to localstorage variable

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 :(

Christian7402253
Posts: 0
Joined: Wed Feb 25, 2015 8:13 pm

Input must be equal to localstorage variable

The code is necessary to proceed to the next page.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Input must be equal to localstorage variable

Hello Christian,

Could you please share print screens of your mapping and events at design tab?

Christian7402253
Posts: 0
Joined: Wed Feb 25, 2015 8:13 pm

Input must be equal to localstorage variable

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!

Christian7402253
Posts: 0
Joined: Wed Feb 25, 2015 8:13 pm

Input must be equal to localstorage variable

by the way how do I mark this thread as answered?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Input must be equal to localstorage variable

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.

Return to “Issues”