Problem with jquery and internet explorer
Hello,
I'm developing a web application and I'm having some problems with internet explorer. I'm using the jquery dialog and in my localhost the application is working perfectly, but when I run it in IIS works fine in all browsers except internet explorer. I have internet explorer 11 version.
I'm using asp.net. The script section is:
<link href="~/Estilos/jquery-ui-1.10.4.custom.css" rel="stylesheet" type="text/css" />
<link href="~/Estilos/estilos.css" rel="stylesheet" type="text/css" title="hoja"/>
<script type="text/javascript" src="<%=ResolveClientUrl("~/js/")%>jquery-1.10.2.js"></script>
<script type="text/javascript" src="<%=ResolveClientUrl("~/js/")%>jquery-ui-1.10.4.custom.js"></script>
<script type="text/javascript" src="<%=ResolveClientUrl("~/js/")%>jquery-ui.js"></script>
<script type="text/javascript" src="<%=ResolveClientUrl("~/js/")%>funciones.js"></script>
The jquery functions:
$(document).ready
(function () {
var model = $("#Model");
var description = $("#Description");
var allFields = $([]).add(model).add(description);
var tips = $(".validateTips");
var menu = $('#menucontenedor');
var contenedor = $('#menuhorizontal');
var menu_offset = menu.offset();
// Cada vez que se haga scroll en la página
// haremos un chequeo del estado del menú
// y lo vamos a alternar entre 'fixed' y 'static'.
$(window).on('scroll', function () {
if ($(window).scrollTop() > menu_offset.top) {
menu.addClass('fixed');
} else {
menu.removeClass('fixed');
}
});
$("#dialogform").dialog({
autoOpen: false,
});
function updateTips(t) {
tips
.text(t)
.addClass("ui-state-highlight");
setTimeout(function () {
tips.removeClass("ui-state-highlight", 1500);
}, 500);
}
function checkLength(o, n, min, max) {
if (o.val().length > max || o.val().length < min) {
o.addClass("ui-state-error");
updateTips("Length of " + n + " must be between " +
min + " and " + max + ".");
//alert("false");
return false;
} else {
//alert("true");
return true;
}
}
$("#MainContent_ImageButton4")
//.button()
.click(function () {
$("#dialogform").dialog({
//title: "jQuery Modal Dialog Popup",
buttons: {
"Create New Model": function () {
var bValid = true;
allFields.removeClass("ui-state-error");
bValid = bValid && checkLength($("#Model"), "Model", 1, 25);
bValid = bValid && checkLength($("#Description"), "Description", 1, 150);
if (bValid) {
guardardatos();
$("#Model").val("");
$("#Description").val("");
}
},
Cancel: function () {
allFields.val("").removeClass("ui-state-error");
$(this).dialog("close");
location.reload();
}
},
close: function () {
allFields.val("").removeClass("ui-state-error");
$(this).dialog("close");
location.reload();
},
//modal: true,
autoOpen: true,
width: 350,
});
return false;
});
});
Do I need to add some library?
Hope someone can help me.
Thanks in advance.