I use the function below to update a webcam image. Now I would like to change the function so that it is not fired when the webcam image is not available (error function). Someone plz help me?
$("img#activecam").error(function () {
//
})
setInterval("updatecam()", 16000);
function updatecam() {
$('#activecam').attr('src', '<?php echo $image; ?>&time='+Date());
}