PDA

View Full Version : Getting Thumbnail Image Viewer to load text



weejy
07-21-2007, 11:52 PM
1) Script Title: Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: I need to load a paragraph of text in one of the loadareas while simultaniously loading an image in the other loadarea.

I managed to do this with the old version of TIV II (like here www.dap-inc.com/lrl/index.shtml )
But I'm at a loss on how to do it with the new version.

Or better yet, if you can tell me how to get Lightbox 2.0 to work with the old TIV II... I've tried for days, but the rel="lightbox" wont initiate Lightbox when the link embedded in the large image is generated dynamically...

jscheuer1
07-22-2007, 06:16 AM
From your source code, additions red, and otherwise using the lightbox v2.03 (http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm) script installed as instructed:


function returnimgcode(theimg){
var imghtml=""
if (theimg[1]!="")
imghtml='<a href="'+theimg[1]+'" target="'+optlinktarget+'" rel="lightbox" onclick="myLightbox.start(this);return false;">'
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
if (theimg[1]!="")
imghtml+='</a>'
return imghtml
}

weejy
07-22-2007, 06:10 PM
Works like a charm!

Many thanks!