Page 1 of 1

Select menu value from localStorage variable

Posted: Mon Oct 26, 2015 3:12 am
by realmadrid2121 .

I have a value stored in local storage variable called "radius"
the value of this is "2"
I have a select menu called "radius_menu"
it has 3 choices .. Label=1 mi Value = 1
Label =2 mi Value = 2
label = 5 mi Value = 5

ON Page load can you share a JS that would ON Page load event change the select menu to read Label 2 mi = with a value = 2
thank you


Select menu value from localStorage variable

Posted: Mon Oct 26, 2015 9:01 am
by Serhii Kulibaba

Hello,

Please use JS on the page show event:

prevar val = Apperyio.storage.radius.get();
Apperyio("radius_menu").val(val).refresh();/pre