While experimenting with this, I found that the server with the animated radar image on it didn't always have the image available. That aside, by adding this (the red part in the below) to the lightbox.js file, at least when the server had the image available, things worked out OK:
Code:
//
// hideLightbox()
//
function hideLightbox()
{
// disable image onload
imgPreload.onload=null;
// get objects
objOverlay = document.getElementById('overlay');
objLightbox = document.getElementById('lightbox');
// hide lightbox and overlay
objOverlay.style.display = 'none';
objLightbox.style.display = 'none';
// disable keypress listener
document.onkeypress = '';
}
I also came up with some refinements for the link which you might like. These updated the radar image, so it couldn't be cached and updated the caption. I put this in the head of the page:
Code:
<script type="text/javascript">
function update_radar(){
return 'http://66.28.250.180/data/nids/SJT19_anim_t.gif?t='+new Date().getTime();
}
</script>
And made the link like so:
Code:
<a href="http://66.28.250.180/data/nids/SJT19_anim_t.gif?t=1051936748" onmouseover="this.href=update_radar();this.title='Click for Larger View';" onmousedown="this.title='San Angelo Radar';" rel="lightbox" title="Click for Larger View"><img height="108" src="http://sirocco.accuweather.com/adc_sat_160x120_public/ei/isaesc.gif" width="151" border="0"/></a>
Bookmarks