Photo Album Script using CSS

User 445070 Photo


Registered User
80 posts

Hi, I created this script form Dynamic Drive, and created a html page in VSD, placed the prescribed header and the following body. It asks for a file photogallery.js to be downloaded. I placed in the directory that holds my Web Page information. I changed the script to accomodate my needs, and previewed it. With little sucess, I got nothing but a blank screen. Can anyone tell me where I gone wrong. Did I place the photogallery.js in the right place? I assume it will find the .jpg files through VSD. This is the web site I used to extract the code: http://www.dynamicdrive.com/dynamicinde … oalbum.htm
Thanks, Jackie



<script type="text/javascript">

//Define your own array to hold the photo album images
//Syntax: ["path_to_thumbnail", "opt_image_title", "opt_destinationurl", "opt_linktarget"]

var equine=new Array()
equine[0]=["freedom1.jpg", "Freedom", "freedom1_s.jpg"]
equine[1]=["storm_warning_1.jpg", "Storm Warning","storm_warning_1_s.jpg"]
equine[2]=["team_work2.jpg", "Teamwork", "team_work2_s.jpg"]

//initiate a photo gallery
//Syntax: new photogallery(imagearray, cols, rows, tablewidth, tableheight, opt_[paginatetext_prefix, paginatetext_linkprefix])
var thepics=new photogallery(equine, 3, 1, '700px', '600px')

//OPTIONAL: Run custom code when an image is clicked on, via "onselectphoto"
//DELETE everything below to disable
//Syntax: function(img, link){}, whereby img points to the image object of the image, and link, its link object, if defined
thepics.onselectphoto=function(img, link){
if (link!=null) //if this image is hyperlinked
window.open(link.href, "", "width=800, height=600, status=1, resizable=1")
return false //cancel default action when clicking on image, by returning false instead of true
}
User 132952 Photo


Ambassador
3,120 posts

You might want to log into your site w/ an FTP app and see where the files are. My guess, if VSD placed the jpgs in the /Files folder, then the script being in the root folder won't find them. You could either edit the paths in the code to point to files/whatever.jpg or move all the related jpg files into the root folder.
I haven't tried that script yet myself though to say for sure if that's the problem. Again, just my guess.
User 445070 Photo


Registered User
80 posts

Hi Adam, I haven't uploaded this yet, I have just been using the preview through VSD. Should I upload it? I placed photogallery.js also in the image file where all the .jpg reside. Just trying everything. But I haven't uploaded it yet. Jackie
User 132952 Photo


Ambassador
3,120 posts

You might have to in order to see if it works. I'm not sure how you can preview images that would be located outside of the /files folder (in the root folder in this case) since VSD places them there by default.
User 445070 Photo


Registered User
80 posts

Hi Adam, I took your advice, but to no avail, it still does not work. I placed the script file in the same folder as the images. I assume that is where it goes??? Jackie

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.