I do this:
Then I do this:
After that
temp = ""0""
and
startPageValue = NaN
Why?
Thanks in advance.
George
Although only half an answer....and you likely already know this...but looks like your local storage value is not "0" but has two sets of quotes around it ""0"" ... So doing parseInt on it will indeed yield NaN ...since you are asking for the numeric value of a string of length 3 ... "0" ... Instead of a string of length 1 and value of 0 .
I'd go around using the visual editor to set the value and do it in a JavaScript localStorage.setItem ...
Best,
Bruce
Hello George,
Using a Storage variable with type=Number avoid additional verifications and convertings
It is set to number type. So why does it end up as ""0""?
I honestly do not trust storing anything to local storage as numeric ... It's unreliable and half the time the data when retrieved comes back as character ... To your implied point George!
You can also use file API but it is also unreliable
A quick followup. I noticed that in the Appery.io documentation on Storage and Models it states, "We strongly recommend that you use the Appery.io Storage API when working with storage variables. Such an approach will guarantee that in the case of any changes on our side, the efficiency of your apps will not be affected" and recommends the Apperyio.storage.storageVariable.get/set api. However, in the forum here I don't see that being used or recommended. Why is that?
Thanks.
We did not recommed use Appery.io storage uses local storage, session storage or window variables, because of you didn't want use these storage. You shouldn't save password anywhere for security.
Sergiy,
???
Don't save passwords anywhere if you are worry about security. More information here:
http://stackoverflow.com/questions/12...
and here:
http://stackoverflow.com/questions/16...