I am calling a function like the one below by click on divs with a certain class.
Is there a way I can check when starting the function if a user is using Internet
I think it will help you Here
function checkIsIE() {
var isIE = false;
if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {
isIE = true;
}
if (isIE) // If Internet Explorer, return version number
{
kendo.ui.Window.fn._keydown = function (originalFn) {
var KEY_ESC = 27;
return function (e) {
if (e.which !== KEY_ESC) {
originalFn.call(this, e);
}
};
}(kendo.ui.Window.fn._keydown);
var windowBrowser = $("#windowBrowser").kendoWindow({
modal: true,
id: 'dialogBrowser',
visible: false,
width: "40%",
title: "Thông báo",
scrollable: false,
resizable: false,
deactivate: false,
position: {
top: 100,
left: '30%'
}
}).data('kendoWindow');
var html = '
Please use the browser below to use the tool
';
html += '';
html += ' ';
html += ' ';
html += '
';
windowBrowser.content(html);
windowBrowser.open();
$("#windowBrowser").parent().find(".k-window-titlebar").remove();
}
else // If another browser, return 0
{
return false;
}
}