Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
rboudwin #1
javascript slideshow with caption
If I comment either one of the lines (image or caption) in each of the
functions, then the other one will work fine in the slideshow. If they are
both there, then the slideshow does not work. Any suggestions?
SCRIPT LANGUAGE="JavaScript">
var pic1 = "<CFOUTPUT
query="photogroupings">/sites/images/#sites.imagedir#/#image1#</CFOUTPUT>"; /*
Copy and paste if you want more pictures in your gallery i.e 'var pic4 =
"apa.jpg"' aso. */
var pic2 = "<CFOUTPUT
query="photogroupings">/sites/images/#sites.imagedir#/#image2#</CFOUTPUT>";
var pic3 = "<CFOUTPUT
query="photogroupings">/sites/images/#sites.imagedir#/#image3#</CFOUTPUT>";
var pic4 = "<CFOUTPUT
query="photogroupings">/sites/images/#sites.imagedir#/#image4#</CFOUTPUT>";
var number = <cfoutput>#variables.countimages#</cfoutput>; /*
Number of pictures in your intended gallery */
var vart = 1 ; /* Control variable, set to 1 just to know where
it is */
cap = new Array ();
cap[1] = "<CFOUTPUT query="photogroupings">#description1#</CFOUTPUT>";
cap[2] = "<CFOUTPUT query="photogroupings">#description2#</CFOUTPUT>";
cap[3] = "<CFOUTPUT query="photogroupings">#description3#</CFOUTPUT>";
cap[4] = "<CFOUTPUT query="photogroupings">#description4#</CFOUTPUT>";
function next()
{
if (vart == number)
document.getElementById("caption").innerHTML= cap[vart];
document.gallery.src = eval("pic" + vart);
else
vart = vart + 1;
document.getElementById("caption").innerHTML= cap[vart];
document.gallery.src = eval("pic" + vart);
}
function previous()
{
if (vart == 1)
document.getElementById("caption").innerHTML= cap[vart];
document.gallery.src = eval("pic" + vart);
else
vart = vart - 1;
document.getElementById("caption").innerHTML= cap[vart];
document.gallery.src = eval("pic" + vart);
}
</SCRIPT>
rboudwin Guest
-
mouseover text image/caption display
One of my favorite web sites uses a very effective technique that links floating boxed captions (sample below) or thumbnails to selected text,... -
Close Caption options
Hi all, I'm researching ways to include Close Caption text with our streaming videos. I found this tool... -
Caption for cfchart
I have been experimenting with CFchart and need to know if there is a way to add a descriptive caption to the chart so that people will know what... -
image caption
can any body can help me to find a com that can read the image caption .... image caption : some images can store some data like image caption it's... -
how to read image caption?
can any body can help me to find a com that can read the image caption ... image caption : some images can store some data like image caption it's... -
rboudwin #2
Re: javascript slideshow with caption
I figured it out. I removed the semicolons within the function and added {} around the two actions within the IF ELSE.
rboudwin Guest



Reply With Quote

