Set/reset drop down list item
I've created a drop down list as below:
<select name="declinereasons" id="declinereasons" onchange="declinereasonsChanged();" >
</select>
And on some event I call the following function to fill my drop down
function fillDeclineReasonList() {
$.getJSON('<%= ResolveUrl("~/myurl/")%>', function (data) {
ReasonCollections = data;
var items = "";
items += "<option value=''>Select One</option>";
$.each(data, function (i, ReasonCollections) {
items += "<option value='" + ReasonCollections.Value + "'>" + ReasonCollections.Text + "</option>";
});
items += "<option value='Others'>Others</option>";
$("#declinereasons").html(items);
});
}
But on certain event I want to set one of the value from this list to be selected and also to make reset the value on clicking on the reset button please help me how I can perform these needed oprations.