I am making Telerik DatePicker dynamically through Partial View in asp.net MVC. Initially i have bind the event like .ClientEvents(events => events.OnChange(“onChangeDatePicker”)), but i found that if you loading controls dynamically you cann’t do that way, you have to bind event dynamically through jQuery Event bubbling. i have below code works fine in my development envoiornment but after deployment on windows server 2008 it stop working in IE9. Its works fine with FF, Safari, Chrome.
Please help me in this.
$("document").ready(function ()
{
debugger;
var dtpickers = $("[Id^=dtt]");
for (i = 0; i < dtpickers.length; i++) {
if ($.browser.msie) {
$(dtpickers[i]).tDatePicker({
onChange: function () { onChangeDatePicker(this); }
});
}
else {
$(dtpickers[i]).tDatePicker({
onChange: function () { onChangeDatePicker(this); }
});
}
}
});
</script>
Updates :
This is my intranet website. if i access it through ip address its wrorking fine, but if i will access it with computer name let say , http://xzy/webapp/ , it does not working.
Its resolved now. It was issue with Compatibility view, by default with Intranet website it is On. so i off it and its work fine with me. I believe jQuery Delegated Events is not compatible with previous version of IE