jquery - cannot call methods on dialog prior to initialization; attempted to call method 'close' when using timeoutDialog plugin -
i trying implement simple session expire bit of code server using timeoutdialog plugin. dialog box appears correctly on click of of buttons error ~cannot call methods on dialog prior initialization; attempted call method 'close' in /static/js/jquery-1.8.2.min.js line 2 > eval. 1 me please?
here's code block:
jquery(function($) { var timeout = 10000; $(document).bind("idle.idletimer", function() { // function want fire when user goes idle $.timeoutdialog({ timeout: 1, countdown: 10, logout_redirect_url: '/logout/', keep_alive_url:'/', restart_on_yes: true }); }); $(document).bind("active.idletimer", function() { // function want fire when user becomes active again }); $.idletimer(timeout); }); <script src="${request.static_url('static/js/timeout-dialog.js')}"></script> <script src="${request.static_url('static/js/idle-timer.js')}"></script>
i tried many options. looks timeoutdialog plugin doesn't support later versions of jquery properly. example here solved problem.
Comments
Post a Comment