Hi
I am hoping that someone here can help me with an iframe problem that others must have, but no-one seems to know the answer to. Now there's a challenge1!!
As a background I am using Google sites, and have tried a couple of iframe gadgets, and contacted the developers about my problem, but I am getting nowhere.
I am putting a live webcam image in an iframe on my site. I have tried several gadgets, and used safe html bypass to create my own. Any of those options seems to work fine, when the camera is online.
As the camera is being serviced from a PC in my shop, it is only online when the shop is open and the PC is on. What happens, obviously, is that when the camera is offline a page error is displayed in the iframe. I want to trap an offline error and display a saved image rather than have the iframe filled with rubbish.
Has anyone any ideas? The following sample code was suggested, but doesn't work in Google sites.
<html>
<p id="iframe" align="center">
<iframe src='http://localhost:8081/index.html' style='border:none' frameborder='0' width="800" height="600" onError="location.href='offline.jpg'"></iframe>
</p>
<img src="http://localhost:8081/onlinetestimg.jpg" width="1" height="1" style="visibility:hidden" onError="document.getElementById('iframe').innerHTML = '<img src=\'offline.jpg\'>'">
</html>Thanks