for a live view of what exactly this is, goto http://www.madmacgames.com/mac_game.php?products_id=29 and click on any of the thumbs (they are all pretty big).
This will be included as standard in my next update of the Dynamic MoPics module, but thought I'd share it here for everyone else as well.
1st you'll need these get 2 image files... save them as catalog/images/loading.gif and catalog/images/loaded.gif respectively:
[img]http://javascript.internet.com/img/resizable-viewer/loading.gif[/img]
[img]http://javascript.internet.com/img/resizable-viewer/loaded.gif[/img]
next in popup_image.php, change the javascript in the head from:
<script language="javascript"><!--
var i=0;
function resize() {
if (navigator.appName == 'Netscape') i=40;
if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
self.focus();
}
//--></script>
to<script language="javascript"><!--
var i=0;
function resize() {
if (navigator.appName == 'Netscape') i=10;
if (document.images[1]) {
imgHeight = document.images[1].height+60-i;
imgWidth = document.images[1].width+30;
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - imgWidth / 2;
var toppos = height / 2 - imgHeight / 2;
window.moveTo(leftpos, toppos);
window.resizeTo(imgWidth, imgHeight);
document.loading.src = 'images/loaded.gif';
}
self.focus();
}
//--></script>
and finally, replace
<body onload="resize();">with
<body onload="resize();"> <div align="center"><img border="0" src="images/loading.gif" width="100" height="9" name="loading" onload="window.focus()"></div>
and that is all folks... upload the 2 new images and new popup_image.php. much better popups now
Ps.. I have also included the fix for netscape that was causing images to get cut off.














