Al Fresco
10-10-2009, 02:03 AM
1) Script Title: Image Thumbnail Viewer II
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm
3) Describe problem: Hi. I'm using the Image Thumbnail Viewer II which is working well in this image gallery test page: http://www.anneknowles.com.au/withoutscript
When I add the following script to to the thumbnail.js file to implement back and next buttons the whole thing stops. ie: http://www.anneknowles.com.au/withscript
The script added is:
///////No need to edit beyond here/////
function findLoaded(){
if(typeof document.getElementById('dynloadarea').getElementsByTagName('img')[0]!=='undefined'){
var theImg = document.getElementById('dynloadarea').getElementsByTagName('img')[0].src
for (var i_tem = 0; i_tem < dynimages.length; i_tem++)
if (theImg.indexOf(dynimages[i_tem][0])>-1)
return i_tem
}
else
return -1
}
function nextImg(){
if (findLoaded()<dynimages.length-1)
modifyimage('dynloadarea', findLoaded()+1)
else
modifyimage('dynloadarea', 0)
}
function previousImg(){
if (findLoaded()>0)
modifyimage('dynloadarea', findLoaded()-1)
else
modifyimage('dynloadarea', dynimages.length-1)
}
As seen in this post: http://www.dynamicdrive.com/forums/showthread.php?t=8291
It may be a conflict with Animated Collapsible DIV v2.4 or perhaps I have made some error elsewhere. Not sure. Can you help please?
Many Thanks.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm
3) Describe problem: Hi. I'm using the Image Thumbnail Viewer II which is working well in this image gallery test page: http://www.anneknowles.com.au/withoutscript
When I add the following script to to the thumbnail.js file to implement back and next buttons the whole thing stops. ie: http://www.anneknowles.com.au/withscript
The script added is:
///////No need to edit beyond here/////
function findLoaded(){
if(typeof document.getElementById('dynloadarea').getElementsByTagName('img')[0]!=='undefined'){
var theImg = document.getElementById('dynloadarea').getElementsByTagName('img')[0].src
for (var i_tem = 0; i_tem < dynimages.length; i_tem++)
if (theImg.indexOf(dynimages[i_tem][0])>-1)
return i_tem
}
else
return -1
}
function nextImg(){
if (findLoaded()<dynimages.length-1)
modifyimage('dynloadarea', findLoaded()+1)
else
modifyimage('dynloadarea', 0)
}
function previousImg(){
if (findLoaded()>0)
modifyimage('dynloadarea', findLoaded()-1)
else
modifyimage('dynloadarea', dynimages.length-1)
}
As seen in this post: http://www.dynamicdrive.com/forums/showthread.php?t=8291
It may be a conflict with Animated Collapsible DIV v2.4 or perhaps I have made some error elsewhere. Not sure. Can you help please?
Many Thanks.