I have a text field in my ASP.Net MVC application, and I need to do some checking when the text field loses focus, so I used the blur event.
The event below works fine in the Chrome browser, but does not work in IE11 and IE10.
Script Code:
$("#NewFileName").on("blur", function () {
alert('triggered');
});
ASP.NET MVC HTML:
<div class ="span6">
<p>
@Html.TextBoxFor(m => m.FileName, new { type = "file" })
</p>
</div>
I tried to use various events, such as "focusout" for IE, but the focus / blur event does not work in IE. What is the correct event for IE10 and 11 browsers?
source
share