jonwrig
Posts: 0
Joined: Mon Feb 06, 2012 3:12 pm

Change selected option of a select control in javascript

Im trying to change the selected text of a select control to a value held in a local storage variable. I can't find any examples that work please help?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Change selected option of a select control in javascript

Hello,

Please try this code:

pre
//Getting select value from LSV.
var selectValue = localStorage.getItem("yourSelectValueLSV");

//Select received value into the select component. Please be sure your value is correct for this select.
Appery("mobileselectmenu_16").val(selectValue);
Appery("mobileselectmenu_16").selectmenu("refresh", true);
/pre

jonwrig
Posts: 0
Joined: Mon Feb 06, 2012 3:12 pm

Change selected option of a select control in javascript

Worked a treat - thanks.

Return to “Issues”