As posted, the otherwise excellent Image Thumbnail Viewer has a bug that only affects Netscape/Mozilla/Firefox based browsers. When an image window first pops up, the dragbar doesn't fully extend the width of the image. Subsequent calls cause the dragbar to extend as expected.
The bug happens when this line of js is called to draw the dragebar:
crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">Close</span> </div><img src="'+which+'">'
The fix is pretty simple - give the dragbar a non-zero width. The fix is highlighted below:
crossobj.innerHTML='<div dragbar width: 1px> <div align="left" id="dragbar"> <span id="closetext" onClick="closepreview()">Close</span> </div> <img src="'+which+'">'
The CSS can remain the same, although this:
#dragbar{
cursor: hand;
cursor: pointer;
background-color: #EFEFEF;
min-width: 100px; /*NS6 style to overcome bug*/
}
can now be simplified to:
#dragbar{
cursor: hand;
cursor: pointer;
background-color: #EFEFEF;
}
The dragbar now extends the full width of the image the first time and every time for all browsers (at least IE, and Gecko based browsers). Works fine on PCs and Macs as well, including Safari.
Frank



Reply With Quote

Bookmarks