I have written a javascript/jquery function to retrieve the selected dropdown value. The page is running well in chrome but when i run my application in IE it throw an error.
$("#Application_AppCountries").change(function () {
var selectedOption = $(this)[0].selectedOptions[0]; //THrow an error on this line
var text = selectedOption.text;
var value = selectedOption.value;
});
And HTML code is:
<div>
@Html.LabelFor(m => m.Application.AppCountries, "Primary Country")<span class="required">*</span>
@Html.DropDownListFor(m => m.Application.AppCountries, Model.Countries)
</div>
Any help or suggestion will be highly appreciated.