PDA

View Full Version : Resolved Image Thumbnail Viewer II coding questions



Kahne_Fan
07-29-2009, 07:20 PM
1) Script Title: Image Thumbnail Viewer II

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

3) Describe problem:
I am wondering if someone might be able to tell me how to move the text label (image descritpion) from below the image, to the right side of the image (if possible).

Also, is it possible to make the 1st image of the set be the default image, so there's not a blank page to start?

ddadmin
07-30-2009, 04:42 AM
Sure, to answer your questions:

1) Inside the .js file, the part that outputs the description is the below:


if (description!="") //Use title attr of the link as description?
imageHTML+='<br />'+description

So to get the description to appear to the right of the image, you might modify the output to something like:


if (description!="") //Use title attr of the link as description?
imageHTML+='&nbsp;'+description

Or something like:


if (description!="") //Use title attr of the link as description?
imageHTML=description+" "+imageHTML

2) You can simply manually add an image tag inside the enlarged image DIV container that shows the initial page, for example:


<div id="loadarea" style="width: 600px"><img src="test.gif" /></div>

Kahne_Fan
07-31-2009, 12:13 AM
Thanks!

I haven't tried the first code yet, but the second worked like a charm!