realmadrid2121 .
Posts: 0
Joined: Mon Sep 22, 2014 1:08 am

Select menu value from localStorage variable

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Select menu value from localStorage variable

Hello,

Please use JS on the page show event:

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

Return to “Issues”