PDA

View Full Version : Lightbox image viewer 2.03



yoghi
05-23-2007, 08:48 PM
A little question...
How may I do to 'launch' the Lightbox image viewer 2.03 usign a mapped image?

I have this code, but doesn't run...the image opens in a new window without lightbox...:

<p>

<img src="../immagini/foto/moda/0_MainMONNabiti.jpg" width="600" height="788" border="0" usemap="#Map">

<map name="Map">
<area shape="poly" coords="87,31" href="#">
<area shape="poly" coords="93,30,57,84,48,173,69,197,136,168,131,79,109,35" href="../immagini/foto/moda/giaccaLAUREL.jpg" rel="lightbox[acqua]" title="l'acqua, cascate di Foroglio, Val Maggia">

</map>
</p>

do you could help me?
thx a lot!
Yoghi

jscheuer1
05-24-2007, 04:39 AM
That actually is the way to do it. Either you need to escape your apostrophe:


title="l\'acqua, cascate di Foroglio, Val Maggia"

Or, more likely, you haven't installed the script properly. Give us a link to your problem page.

yoghi
05-24-2007, 06:31 AM
I'm sorry for the bad posting...
the link to my problem is:
http://www.gix-studio.ch/galleries/moda.htm
the mapped zone is the first jacket on the left top of the big picture.
As You can see, the linked image open in an individual window, and not using the script...
in other pages, like this:
http://www.gix-studio.ch/galleries/saltoostacoli.htm
using thumbdails, it works correctly...
thx again
Yoghi

jscheuer1
05-24-2007, 07:28 AM
Your post says that you are using lightbox 2.03. However, the script on your server is lightbox 2.02. It doesn't initialize area tags. It only works with anchor links. Download a fresh copy of lightbox v2.03 here:

http://www.dynamicdrive.com/dynamicindex4/lightbox2/lightbox2.03.zip

and install its files over the version 2.02 files that you have (replace the 2.02 files with the 2.03 files).

yoghi
05-24-2007, 08:22 AM
I have updated the files as you said, but doesn't run... :(
maybe an error on my code...do not know... :(

jscheuer1
05-24-2007, 08:47 AM
At least now it is initializing and trying to display. I think the problem you have is:


rel="lightbox[moda]"

Since there is only the one, it is looking for the others and not finding them. For a single lightbox effect that is not a part of a group, use only:


rel="lightbox"

That, or add more:


rel="lightbox[moda]"

area and/or anchor tags with valid image href's to the page.

The thing is, you cannot use the group syntax if there is only one on the page. Don't try to cheat either, the script automatically eliminates duplicate images.

yoghi
05-24-2007, 09:05 AM
OK!
Now without the group it works!!!
many many thx!!!