Welcome visitor
* Login
* Register
It is currently September 18th, 2019, 12:31 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  cancel refresh
PostPosted: May 29th, 2009, 6:36 am 
User avatar

Posts: 44
hey, i got a script from some site to refresh my site each 10 seconds using javascript but now that i added a video into my site it is annoying cos the video will stop and restart each time the page is reloaded, how can i stop this?

thanks for your help.


Top
 Profile  
 
  Re: cancel refresh
PostPosted: May 29th, 2009, 7:33 am 
User avatar

Posts: 79
Since you dont provide us with code i will only tell you how to do it. Use a var (e.g. $off) to allow or block the refresh, and its default value would be "1". When the user turns off the auto refresh (e.g. clicks a button) then change the value of $off to 0. Now this is going to work if you add a validation to the function you use to refresh, something like
function refreshthis(){
if($off>=1){refresh lines (the code you already have goes here)...}}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron