I'm slowly learning Jvascriopt, creating a personal webpage to display snapshots from my webcam. It sends files to my FTP server every x seconds, but changes the filename to include date/time coding. I want to display the latest file, but its impossible to sync camera, server and workstation time down to the second. So my plan is to loop down from 59 secs, looping when the file is not found.
If I have the following line, I want to trap an error if the file is not found. The "TRY" method doesn't seem to capture an error though, any ideas?