Hello,
I m doing a project in which i have written a jquery for datepicker and system idle time. It is properly working on mozila and google chrome but doesn't work on IE8 or IE11 and throwing following error message.
"Object doesn't support this property or method"
i have following code for page
this is for System idle time:
<script type="text/javascript">
idleMax = 5; // Logout after 5 minutes of IDLE
idleTime = 0;
$(document).ready(function () {
var idleInterval = setInterval("timerIncrement()", 60000);
$(this).mousemove(function (e) { idleTime = 0; });
$(this).keypress(function (e) { idleTime = 0; });
})
function timerIncrement() {
idleTime = idleTime + 1;
if (idleTime > idleMax) {
window.location = "../login.aspx";
}
}
</script>
And this code is for Datepicker:
<asp:TextBox ID="txtdate1" runat="server" AutoPostBack="True" OnTextChanged="txtdate1_TextChanged"></asp:TextBox>
<asp:HiddenField ID="HiddenField1" runat="server" />
<script type="text/javascript">
$(document).ready(function () {
$("input[id$=txtdate1]").datepicker({
changeMonth: true,
changeYear: true,
maxDate: '0',
altField: '[id$=HiddenField1]'
});
if ($("[id$=HiddenField1]").attr("Value").length > 0) {
$("[id$=txtdate1]").datepicker("setDate", new Date($("[id$=HiddenField1]").attr("Value")));
}
});
</script>
Please help me as soon as possible....