auto refresh
3 posters
Page 1 of 1
auto refresh
hello forumotion team
how can i have auto refresh in my home pege?
for example for each 20 sec
how can i have auto refresh in my home pege?
for example for each 20 sec
Re: auto refresh
- Code:
jQuery().ready(function($){
refresh_interval = 20000; // 20 sec
setTimeout(function(){
window.location.reload();
console.log("refresh time is" + refresh_interval)
}, refresh_interval);
});
Re: auto refresh
Sorry
Go to: Administration Panel ~> Module ~> HTML & JAVASCRIPT ~> JavaScript code management.
Go to: Administration Panel ~> Module ~> HTML & JAVASCRIPT ~> JavaScript code management.
Re: auto refresh
it was working
but i want when i dont use the mouse or forum after the page be refresh
becuase when i chat in chat box it can refresh automaticaly and it make users angry
but i want when i dont use the mouse or forum after the page be refresh
becuase when i chat in chat box it can refresh automaticaly and it make users angry
Re: auto refresh
i mean i want auto refresh in my forum but when im not using forum and when im not in chat box or write topicsInFeRn0 wrote:I do not understand what you mean.
You want a class / id to Forum Refresh?
Re: auto refresh
Hello,
If you want the auto refresh not to work when you're moving around or typing, try this code:
Now in this part:
20 means 20 seconds, if you want longer or shorter refresh intervals, you can increase or decrease that number.
If you want the auto refresh not to work when you're moving around or typing, try this code:
- Code:
$(function() {
var idletime=0;
setInterval(function() {
idletime += 1;
if (idletime > 20) {
window.location.reload();
}
}, 1000);
$(this).on('mousemove', function(e) {
idletime=0;
});
$(this).on('keypress', function(e) {
idletime=0;
});
});
Now in this part:
- Code:
if (idletime > 20)
20 means 20 seconds, if you want longer or shorter refresh intervals, you can increase or decrease that number.
Jophy- ForumGuru
- Posts : 17924
Reputation : 836
Language : English
Location : Somewhere
Similar topics
» I would like to add auto-refresh
» auto refresh
» Auto Page Refresh
» auto refresh div content ...
» Auto Refresh on Portal
» auto refresh
» Auto Page Refresh
» auto refresh div content ...
» Auto Refresh on Portal
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum