I have the following select list inside my web page:-
<select id="OrderStatus_12192838383111121" title="Status Required Field" class="ms-RadioText">
<option>In Progress</option>
<option>Waiting Customer Approval</option>
<option>Reject</option>
</select>
now i want to select one of the above options based on the value from another field, so i tried the following:-
var pmname = $('[id^="OrderProjectManagerStatus_"][id$="Display"]').attr("title");
alert(pmname);
$('select[id^="OrderStatus_"]').text() == pmname;
now the alert showed the correct value, which as "Reject", but this option did not get selected inside my select list using $('select[id^="OrderStatus_"]').text() == pmname;
.
so can anyone advice how i can dynamically set the selected option for my select list using jQuery ??
Thanks