Forum Moderators: open

Message Too Old, No Replies

Using JS to detect the timestamp of a webcam image?

Got it working w/ PHP but would like to avoid renaming page extensions..

         

Don_Hoagie

1:34 pm on Jan 13, 2006 (gmt 0)

10+ Year Member



So folks, I don't know if this is doable client-side, but then that's why I'm here, and you're there.

I basically have 2 image buttons- a "webcam is on", and a "webcam is off"- and which one gets relayed to the page is dependent upon the timestamp of the webcam's image. If the timestamp of the cam image is from less than 30 seconds ago, the "webcam is on" button shows up. My question is, can JS detect the timestamp of an uploaded image? Seems like a lost cause to me, but any ideas are very much appreciated.

whoisgregg

2:31 am on Jan 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Write a new PHP script that simply outputs the timestamp of the webcam image as XML. Then use the XMLHttpRequest Object with a timer to check that PHP generated XML file every couple seconds and, if appropriate, change out the .src of your webcam status image.