I was wanting to perform a Javascript function when dropdown lost focus.
I'm doing it this way, using onBlur, and it's not working:
function DesabilitaFiltro() {
alert("ok");
}
<div class="form-group">
@Html.DropDownList("Severidade", (IEnumerable<SelectListItem>)ViewBag.Severidades, "Severidade", new { @class = "ui fluid search dropdown", style = "width: 100%", multiple = "", onchange = "Filtro()", onBlur="DesabilitaFiltro()" })
</div>
<div class="form-group">
<select class="ui fluid search dropdown" id="Severidade" multiple="" name="Severidade" onBlur="DesabilitaFiltro()" onchange="Filtro()" style="width: 100%"><option value="">Severidade</option>
<option>MEDIA</option>
<option>ALTA</option>
<option>BAIXA</option>
<option>CRITICA</option>
</select>
</div>
If someone knows why it's not working, help me ...