myyoungfamily
03-29-2006, 02:34 AM
This is a JavaScript question although it is in regards to this php script: http://www.dynamicdrive.com/dynamicindex4/php-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
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
}
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.
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
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
}
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.