View Full Version : .js files. where to store them?

09-12-2008, 07:52 PM
Hi. I had been trying to get a lightbox code to work from dynamicdrive. Their forums dont appear to be updated regularly or frequently so have come to a dead end.
The link is here. http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm
All seems well, except for a couple of points. I have never successfully done code with .js or zip before. So 1) when i download the zip file, do i just save it along with other files on my frontpage site? unopened?
And 2) in the code it says make sure the directory correctly points to the file. Again i have tried allsorts of directory addresses to specify where i have stored it, but it still doesnt seem to work.
I was wondering and hoping someone might have the patience to talk me through it please, as there are so many codes now which seem to be in zip format and i dont really know how to get them to work. Any help gratefully appreciated. Thanks...

09-12-2008, 08:22 PM
If the files are in a zip file you'll need to extract them and (usually) put them into the same directory as the web page that you're going to use them in. With the example you linked to just put the css and js files in the same directory as your website. Has this been uploaded to a website or is it on your computer? Any chance you can paste the code you've used to link to the js file?

09-13-2008, 08:15 PM
Hi Thank you for your help.
Am intrigued as someone a while back i asked said nah leave it unzipped. lol. So.. ok.. i unzip the file and save them in the MyWebs folder i am working on. ?!
The code where i need to point to the image i have as this so far...
<a href="images/041.JPG" rel="lightbox" ><img src="images/041_small.JPG" /></a></td>
<td width="3%">&nbsp;</td>

i am unsure where the lightbox bit should point to?
Thanks. Im sorry im not very up on these things.

09-14-2008, 06:10 PM
What you have their is fine. What exactly is the problem? Do you have a link to your site?

09-25-2008, 08:41 PM
Hi... i posted a reply the other day.. doesnt look like it came through. When i preview the page with the code on, it comes up undefined component or directory in line 2.
And just displays a border with a red x.
Otherwise i can get it to display a thumbnail but with no link attached to it.

09-25-2008, 10:50 PM
I'm not sure what you are doing wrong. We would need a link to your site to tell you for sure.

09-30-2008, 08:49 PM
I found another code from javascript kit site. Have tried this and it and in preview it says. line 259 error. dhtmlHistory undefined.
my site i am trying it on is http://www.lightunderabushel.co.uk

10-01-2008, 03:09 PM
You never unzipped the files from the zip file. That is your problem.

10-07-2008, 08:28 PM
I am still unsure how to unzip them (when saving the file from the save target as option i download it, then have clicked open and have tried open folder options.) Yet i am unsure where and how to store these files once opened. I cannot seem to drag or cut and paste into my frontpage program. Where and how do i store the files and unzip them please? Thanks.

10-07-2008, 09:21 PM
Once you open the zip file just drag and drop the files into the same location as your other files. Don't try to drag them into frontpage. You need to drag them to your desktop or another folder on your system.