TonyS
Posts: 0
Joined: Thu Jun 11, 2015 12:11 pm

Get local storage item

why doesn' this work?

var lan = localStorage.getItem("language");
alert(lan);

I can do it with set property so the variable exists.

Thanks.

TonyS
Posts: 0
Joined: Thu Jun 11, 2015 12:11 pm

Get local storage item

No worries, fixed it. I assumed that if a label value could be set using the set property that the local variable existed. Obviously not, so i created a local variable and call that. It worked.

Return to “Issues”