Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

set dropdown value using jquery

/*make sure that value is included in the options value of the dropdownlist 
e.g. 
(<select><option value='CA'>California</option><option value='AK'>Alaska</option>      </select>)
*/

$('#mycontrolId').val(myvalue).attr("selected", "selected");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #dropdown #jquery
ADD COMMENT
Topic
Name
9+1 =