Click here to Skip to main content
15,885,943 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
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:


XML
<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:

XML
<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....
Posted
Comments
SRS(The Coder) 26-Jun-14 3:47am    
IE 8 does not supports many of the lates jQuery methods please check the list for it what jQuery file version are you using what are functions available in it are not supported in IE 8.

Again please check in developers tool exactly which method is not supported, if you got then you can replace it by pure JavaScript method.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900