View Full Version : Image Thumbnail Viewer - image location?

08-02-2005, 09:09 AM
Is there any way to control the image so when it pops up the whole image can be seen. I tried the 'center' variable and it is relitive to the window and with different screen resolutions this is too unpradictable. Can I force the image to pop up like a tool tip (relative to location on screen) so that it is completely visable? Or can I set it to pop up and start at the Left edge of my Frameset?

Thanks for any help

08-02-2005, 04:09 PM

08-03-2005, 02:58 AM
Script: Image Thumbnail Viewer

(My test page) :

Thanks for any assistance!

08-03-2005, 04:05 AM
I tried center, with the actual image sizes as specified in the instructions and it seemed fine:

<p align="center">set-in up :: pre-party :: telling stories of yesterdays <br>
<a href="" onClick="return enlarge('',event,'center',600,348)"><img src="images/04_pics/camping.jpg" alt="Pre Party : Settin up the tents" name="camping" width="97" height="55" border="0"></a>
<a href="" onClick="return enlarge('',event,'center',500,339)"><img src="images/04_pics/registration_01.jpg" alt="You've gotta sign-in" name="registration" width="83" height="55" border="0"></a>
<a href="" onClick="return enlarge('',event,'center',600,238)"><img src="images/04_pics/Let_get_started_03.jpg" alt="anxiety builds as the opening ceremonies draws near" name="Let_get_started_03" width="121" height="55" border="0"></a>
<a href="" onClick="return enlarge('',event,'center',600,442)"><img src="images/04_pics/Let_get_started_02.jpg" alt="lets get this party started" name="Let_get_started_02" width="80" height="55" border="0"></a>

08-04-2005, 08:42 AM
Center works perfect, however it is relative to the screen size and I'm NOT having problems with the script working. What I am trying to do is have it behave like a tool tip and pop up the new image on screen regardless of screen size. Or If it could simply pop up the window align to the left side of the frame window.

Let me know if you have any ideas.


08-04-2005, 08:56 AM
Well, to behave like a tool tip, you remove:

, 'center', 300, 400

from the call, so it looks more like this:

<a href="photo1.jpg" onClick="return enlarge('photo1.jpg',event)">
<img src="thumbnail.gif" border="0"></a>If after doing that, you want it to simply align to a certain position, go into the code, there are a couple of ways to do this, here's one, find:

var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}and change those to your preferred coordinates, ex:

var horzpos=10
var vertpos=100

08-05-2005, 07:58 AM
JOHN your the man. Thanks, being able to set the image to the left edge works perfect.

Thanks for all your efforts.