calculate idle time and auto press button
put this code in head script below code put in these tags….. script head
idleTime = 0;
$(document).ready(function () {
//Increment the idle time counter every minute.
var idleInterval = setInterval(“timerIncrement()”, 60000); // 1 minute

//Zero the idle timer on mouse movement.
$(this).mousemove(function (e) {
idleTime = 0;
});
$(this).keypress(function (e) {
idleTime = 0;
});
})
function timerIncrement() {
idleTime = idleTime + 1;
// alert(‘your Timeout’);
if (idleTime > 18) { // 20 minutes
// window.location.reload();
//document.getElementById(‘loginForm:logoutbtn’).click();
closeButton();
}
}
function closeButton() {
//auto press button….
document.getElementById(‘loginForm:logoutbtn’).click();
}

Advertisements
Comments
  1. photography course says:

    Whoa! This blog looks exactly like my old one! It’s on a completely different subject but it has pretty much the same layout and design. Outstanding choice of colors!

  2. Justine Gasparino says:

    What’s Happening i’m new to this, I stumbled upon this I have found It positively useful and it has helped me out loads. I hope to contribute & assist other users like its helped me. Good job.

  3. Soon says:

    F*ckin’ awesome things here. I am very glad to see your post. Thanks a lot and i am looking forward to contact you. Will you please drop me a mail?

  4. website says:

    obviously like your web site but you need to check the spelling on several of your posts. Many of them are rife with spelling problems and I find it very bothersome to tell the truth nevertheless I’ll certainly come back again.

  5. Strony www says:

    I am really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Anyway keep up the nice quality writing, it is rare to see a nice blog like this one today..

  6. seo book says:

    I was looking through some of your blog posts on this website and I think this internet site is very instructive! Continue putting up.

  7. coach credit card holder says:

    I take pleasure in, cause I discovered exactly what I used to be having a look for. You have ended my 4 day lengthy hunt! God Bless you man. Have a great day. Bye

  8. Florida resorts says:

    I do consider all of the concepts you’ve presented to your post. They are very convincing and will certainly work. Nonetheless, the posts are too quick for starters. May just you please extend them a little from subsequent time? Thank you for the post.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s