I have a page with a webcam image in it. The webcam uploads a new image
every 60 seconds, and I use a HTML refresh to refresh the whole page every
60 seconds.
It seems a bit clunky to me. It's worked just fine for several years, but
I'd like to see if i can find a way to refresh only the div
You can use a setInterval call in JS to run every 60 seconds and reload the
image. You don't need a jQuery plugin for this.
On Thu, Oct 17, 2013 at 6:16 AM, Mike K afpwebwo...@gmail.com wrote:
I have a page with a webcam image in it. The webcam uploads a new image
every 60 seconds, and I
Real quick example here. It uses a date object to add a unique URL
parameter to the end which should help with caching. No jQuery used, just
standard HTML. The querySelector call is *kinda* modern-ish only (see
caniuse.com for specifics) and could be replaced by
document.getElementById. Oh - and
If you want to get anal, you could set a setTimeout and listen for the load
event on the image. That way if it takes a bit longer to load an image one
time the code will hold off on firing another request. (Probably not an
issue though if you are waiting 60 seconds.)
On Thu, Oct 17, 2013 at
Ray, thanks for this. I can see you get your kicks writing bits of code
like this dont you. You've gone wy past answering my question as
you usually do, and I'm most grateful. I have a suspicion your idea of a
relaxing evening on your vacation is a coding problem and a laptop, where
On Thu, Oct 17, 2013 at 8:40 PM, Mike K afpwebwo...@gmail.com wrote:
Ray, thanks for this. I can see you get your kicks writing bits of code
like this dont you. You've gone wy past answering my question as
you usually do, and I'm most grateful. I have a suspicion your idea of a
6 matches
Mail list logo