views:

34

answers:

1

Possible Duplicate:
Detecting idle time in JavaScript elegantly.

I have a table with some rows that I want to refresh for example every 10 minutes. Is there a way I can do this, but only if the user isn't currently active on that page?

Is there for example anything like an inactivity timer or something in JavaScript?

+1  A: 

you should be able to use this and accomplish what you need: http://www.erichynds.com/jquery/a-new-and-improved-jquery-idle-timeout-plugin/

have a look at the options and the onIdle option, adding your function here should do the trick

Moin Zaman
@Moin this is likely to be closed as a duplicate. Why not add your answer in the other question as well? As far as I can see, it's not there yet and it's good info.
Pekka
did that, thanks
Moin Zaman