noobster
01-19-2007, 02:13 PM
1) Script Title: Image Thumbnail Viewer
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
3) Describe problem:
Hi, here it is.
i have setup the dynamic thumbnail viewer and everything works fine (images and tn are coming from a database, all is well...)
but one of the functions that seems interesting at first glance bothers me :p
i would like to be able to position the div (frame) that contains the magnified original image.
With default script it opens in a frame centered whatever happens.
If i edit that part:
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}
by editing the red part and removing the center tag, i should be able to position this div at will but i don't know much about this script function.
if this script can't be modified, is there anything that does about the same?
i tried Image Thumbnail Viewer II but can't use it with a database.
thanks in advance
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
3) Describe problem:
Hi, here it is.
i have setup the dynamic thumbnail viewer and everything works fine (images and tn are coming from a database, all is well...)
but one of the functions that seems interesting at first glance bothers me :p
i would like to be able to position the div (frame) that contains the magnified original image.
With default script it opens in a frame centered whatever happens.
If i edit that part:
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX
var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY
}
by editing the red part and removing the center tag, i should be able to position this div at will but i don't know much about this script function.
if this script can't be modified, is there anything that does about the same?
i tried Image Thumbnail Viewer II but can't use it with a database.
thanks in advance