PDA

View Full Version : Havn't a clue what I am doing wrong



Littlebit
05-08-2008, 07:21 PM
1) Script Title: Lightbox JS v2.03

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

3) Describe problem: Hi, I am trying to install the above script into my site, I have followed the instructions and put the scripts into my header(not sure if it is in the right place) and added the link to the photo to activate the lightbox, I have tried it on an old outdated page no longer on my site but and I am just getting an error message, I am not sure what I am doing wrong, I have viewed the source and the link to my pictures seem to be just a load of rubbish and not what I originally linked to, I would be grateful if anyone could help me with this.

Elizabeth

Littlebit
05-08-2008, 07:25 PM
Sorry I should have put the link to the page I have added this too, it is:

http://www.evy-designs.com/Putting_on_the_ritz_vintage_charm_bracelet.html

thanks

jscheuer1
05-08-2008, 08:09 PM
I think you used the wrong method to insert the link into your source code. It looks like this:


<a title="" href="&lt;a%20href=&quot;http://www.evy-designs.com/IMG_0781.jpg&quot;%20rel=&quot;lightbox&quot;%20title=&quot;my%20caption&quot;&gt;image%20#1&lt;/a&gt;"> . . . . </a>

It should look like this:


<a href="http://www.evy-designs.com/IMG_0781.jpg" rel="lightbox" title="my caption"> . . . . </a>

Also, the scripts:


<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="js/lightbox.js" type="text/javascript"></script>

aren't available to the page where the above tags say that they will be. Each one should be in a folder 'js' off of the folder that the page is in. Be sure to also include effects.js in that folder, as it is called by scriptaculous.js.

The style:


<link media="screen" type="text/css" rel="stylesheet" href="css/lightbox.css" />

isn't there either. It should be in a folder named 'css' off of the folder where the page is.

The above files are all in the distribution archive:

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

linked to on the demo page.

There are also resource images in that archive, these should be in a folder 'images' off of the folder that your page is in.

In the archive, all these files are there and are in their respective folders.

There could still be other problems.

Littlebit
05-08-2008, 08:35 PM
Thanks,

I have re-check all the files, I think they are in the right places now, I just wanted to check with you when you said I may have used the wrong method to link to the source code, I have just clicked the add a link button, should I be doing this another way?

thanks

Elizabeth

jscheuer1
05-08-2008, 10:20 PM
It looks as though the files are now in the right places. About the source code of your page - since I'm not sure what editor you are using for that, and I can't possibly be expected to know how each and every editor works, my suggestion to you would be to open the file in a plain text editor like NotePad, and make the correction. Just change this:


<a title="" href="&lt;a%20href=&quot;http://www.evy-designs.com/IMG_0781.jpg&quot;%20rel=&quot;lightbox&quot;%20title=&quot;my%20caption&quot;&gt;image%20#1&lt;/a&gt;">

to this:


<a href="http://www.evy-designs.com/IMG_0781.jpg" rel="lightbox" title="my caption">

and save. As long as the path and filename:


http://www.evy-designs.com/IMG_0781.jpg

are correct, it will work.

Littlebit
05-08-2008, 10:29 PM
thanks for all your help, I will give that a try.

bye for now
Elizabeth

Littlebit
05-08-2008, 10:33 PM
yipee, just tried it and it worked, many many thanks.

goodnight.

elizabeth

Littlebit
05-09-2008, 05:30 PM
Sorry I am back again, I have managed to get link the script when I am using just one picture, however when I follow the instruction to use the group script, text is showing which is linked which is exactly what I want, but only linked from the picture not text.

If anyone can spare the time and have a look, and let me know if possible where I am going wrong I would be most grateful. you can find the page at: http://www.evy-designs.com/Thundercloud.html.

many thanks

Elizabeth

jscheuer1
05-09-2008, 07:42 PM
If you want it to trigger off of an image, you need it to look like so in the source code:


<a href="http://www.evy-designs.com/IMG_5549-3.jpg" rel="lightbox[Thundercloud]"
title="Thundercloud"><img height="283" alt="" width="320" border="0"
src="/IMG_5549-3.jpg" /></a>

I added the red to the link tag (which has an opening and closing tag) and the highlight to the image tag (which is just one piece), so that you can see how the two work together.