This is a JavaScript question although it is in regards to this php script: http://www.dynamicdrive.com/dynamici...photoalbum.htm
Here's my trouble...
I believe the script below is used to output an "<a href=" path to an image. I need to be able to add a ".pdf" file extention to the path being output by this script.
Instead of the path being: http://www.site.com/pic1.jpg
I need the path to be: http://www.site.com/pic1.jpg.pdf
My reason for doing this is so I can use the gallery image thumbnail for viewing purposes and when it gets clicked the "<a href=" will link to a dowloadable pdf.Code:function buildimage(i){ var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0] var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onClick="return popuplinkfunc(this)">' tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+' ['+galleryarray[i][1]+']" />' tempcontainer+='</a><br />' tempcontainer+=(descriptionprefix[0]==1)? descriptionprefix[1]+(i+1) : "" return tempcontainer }



Reply With Quote

Bookmarks