Reputation: 810
When any text entered in text field, ( shown in an image )and if it is incorrect then it Open one alert box on ONBLUR event. It working fine in all browser except one, IE 8.
In IE 8 when I am typing wrong letters and then directly clicking on datepicker icon then it's not appear alert. That means not executes onblur event in ie8.
NOTE: Here text field has type text, so user can write anything.
Means I am facing problem in onblur event in ie8 any help appreciated.
Upvotes: 0
Views: 1826
Reputation: 7597
Seems to work in IE7 and up. Just a thought.
<input type='text' id="id" name="name" maxlength="10" />
<input type='text' id="id2" name="name2" onBlur="Count(this);" maxlength="10" />
<script type="text/javascript">
function Count(arg) {
arg.value = 'blue';
return arg.value;
}
// another option
var t = document.getElementById("id");
t.onblur = function() { alert("blurring"); };
</script>
Upvotes: 1