PDA

View Full Version : dhtml manual Image Slideshows



davescallon
12-02-2009, 04:32 AM
http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm

Set up a web page for a photoshoot, and wanted to put in a manual slideshow, imported both codes but the slideshow images do not show. Have I done something wrong?

Any help will be great.

The page is has follows

http://www.selenacarter.co.uk/Photoshoots.html, and then the doubletake link.

Thank you again

dave

ddadmin
12-02-2009, 11:01 PM
Your image paths are missing the opening quotes inside the script:


photos[0]="<img src="DoubleTakeStudios/main/M028766tonsha005HCm.jpg"
photos[1]=<img src="DoubleTakeStudios/main/M028766tonsha006HCm.jpg"
photos[2]=<img src="DoubleTakeStudios/main/M028766tonsha007HCm.jpg"
photos[3]=<img src="DoubleTakeStudios/main/M028766tonsha009HCm.jpg"
photos[4]=<img src="DoubleTakeStudios/main/M028766tonsha010HCm.jpg"
photos[5]=<img src="DoubleTakeStudios/main/M028766tonsha011HCm.jpg"

The code in red should be added to the start of each image path.

davescallon
12-03-2009, 12:33 AM
Ok will try that.

Thank you for your help

davescallon
12-03-2009, 12:42 AM
added " at both ends, still nothing, if I click on the next slide, it takes me back to the home page.

jscheuer1
12-03-2009, 01:37 AM
None of your images for the slide show exist, and that's just the start of things, ex:

http://www.selenacarter.co.uk/DoubleTakeStudios/main/M028766tonsha005HCm.jpg

is a 404 not found. Where are these images?

davescallon
12-03-2009, 01:48 PM
The images are in a folder on the server called doubletakestudios, my mistake, I added caps where there was none. But they are still not showing.

<HTML>
<HEAD><TITLE>alternative fashion shoot at doubletakestudios - 2009</TITLE>
<META http-equiv=content-type content="text/html; charset=ISO-8859-1">
<SCRIPT type=text/javascript>
/***********************************************
* DHTML slideshow script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var photos=new Array()
var photoslink=new Array()
var which=0
//define images. You can have as many as you want:
photos[0]="<img src="doubletakestudios/main/M028766tonsha005HCm.jpg"
photos[1]="<img src="doubletakestudios/main/M028766tonsha006HCm.jpg"
photos[2]="<img src="doubletakestudios/main/M028766tonsha007HCm.jpg"
photos[3]="<img src="doubletakestudios/main/M028766tonsha009HCm.jpg"
photos[4]="<img src="doubletakestudios/main/M028766tonsha010HCm.jpg"
photos[5]="<img src="doubletakestudios/main/M028766tonsha011HCm.jpg"
//Specify whether images should be linked or not (1=linked)
var linkornot=0
//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]=""
photoslink[1]=""
photoslink[2]=""
//do NOT edit pass this line
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}

That is the new code above, have I missed anything else?

jscheuer1
12-03-2009, 02:39 PM
I did say (emphasis added):


None of your images for the slide show exist, and that's just the start of things

Bit at least now that I can find the images, I was able to get it to work. Your image array entires are still wrong. What ddadmin told you about them was, uncharacteristically for him, wrong. They should look more like the ones on the demo page for the script. They should look like so:


photos[0]="doubletakestudios/main/M028766tonsha005HCm.jpg"
photos[1]="doubletakestudios/main/M028766tonsha006HCm.jpg"
photos[2]="doubletakestudios/main/M028766tonsha007HCm.jpg"
photos[3]="doubletakestudios/main/M028766tonsha009HCm.jpg"
photos[4]="doubletakestudios/main/M028766tonsha010HCm.jpg"
photos[5]="doubletakestudios/main/M028766tonsha011HCm.jpg"

Now, I was working from the page at:

http://www.selenacarter.co.uk/Alternative Fashion Shoot At DoubleTakeStudios - 2009.html

In that page you also have:


<SCRIPT>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="'%2bphotos%5b0%5d%2b'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</SCRIPT>

That should be:


<SCRIPT>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="' + photos[0] + '" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</SCRIPT>

The rest of the page is still a mess, but just that much will get it working.

davescallon
12-04-2009, 02:29 PM
John, Thank you so very much, she will be so so pleased. This is the first time I have used Java.

So what else is wrong with the page, because I would like to sort it out completly, two people, and at least two editors, before the Java, and then after it. No wonder it is a bit of a mess.

Dave:)

jscheuer1
12-04-2009, 04:52 PM
I really am not inclined to go over every detail of that (what else is wrong with the page). But I did notice that the layout looked odd. The images on the bottom (which I'm not even sure you are going to keep now that the slide show works) and just about everything else is centered, but the slide show is not, it's to the left. There are also larger than seems right gaps between some things in some places as you scroll down the page.

I fixed that much like so:


<HTML>
<HEAD><TITLE>alternative fashion shoot at doubletakestudios - 2009</TITLE>
<META http-equiv=content-type content="text/html; charset=ISO-8859-1">
<SCRIPT type=text/javascript>
/***********************************************
* DHTML slideshow script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var photos=new Array()
var photoslink=new Array()
var which=0
//define images. You can have as many as you want:
photos[0]="doubletakestudios/main/M028766tonsha005HCm.jpg"
photos[1]="doubletakestudios/main/M028766tonsha006HCm.jpg"
photos[2]="doubletakestudios/main/M028766tonsha007HCm.jpg"
photos[3]="doubletakestudios/main/M028766tonsha009HCm.jpg"
photos[4]="doubletakestudios/main/M028766tonsha010HCm.jpg"
photos[5]="doubletakestudios/main/M028766tonsha011HCm.jpg"
//Specify whether images should be linked or not (1=linked)
var linkornot=0
//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]=""
photoslink[1]=""
photoslink[2]=""
//do NOT edit pass this line
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}
function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}
function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}
function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}
function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function transport(){
window.location=photoslink[which]
}
</SCRIPT>

<STYLE>
BODY, TD, P {font-size: 12pt; font-family: times new roman, times, serif}
H1 {font-size: 26pt; font-family: arial, helvetica, sans-serif; font-weight: normal}
H2 {font-size: 18pt; font-family: arial, helvetica, sans-serif; font-weight: normal}
H3 {font-size: 16pt; font-weight: normal}
H4 {font-size: 14pt; font-weight: normal}
A {text-decoration: none}
A:hover {text-decoration: underline}
</STYLE>
</HEAD>
<BODY style="BACKGROUND-IMAGE: url(background7.jpg); COLOR: rgb(204,0,0); BACKGROUND-COLOR: rgb(0,0,0)" vLink=#990000 aLink=#990000 link=#990000>
<DIV style="TEXT-ALIGN: center"><BIG><BIG><BIG><SPAN style="FONT-FAMILY: Ringbearer"><SPAN style="TEXT-DECORATION: underline"><SPAN style="FONT-WEIGHT: bold">Alternative Fashion Shoot At DoubleTakeStudios - 2009<BR></SPAN></SPAN></SPAN></BIG></BIG></BIG><BIG><BIG><SPAN style="FONT-FAMILY: Ringbearer"><SPAN style="TEXT-DECORATION: underline"><SPAN style="FONT-WEIGHT: bold">(With Model Lexic)<BR><BR></SPAN></SPAN></SPAN></BIG></BIG>

<CENTER>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD style="WIDTH: 600px; HEIGHT: 600px; TEXT-ALIGN: center" colSpan=2>
<SCRIPT>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="' + photos[0] + '" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</SCRIPT>
&nbsp;</TD></TR>
<TR>
<TD width=21 height="50%">
<P align=left><A onclick="backward();return false" href="/#">Previous Slide</A></P></TD>
<TD width=21 height="50%">
<P align=right><A onclick="forward();return false" href="/#">Next Slide</A></P></TD></TR></TBODY></TABLE></CENTER>
<P align=center><FONT face=Arial size=-2>Free DHTML scripts provided by<BR><A href="http://dynamicdrive.com/">Dynamic Drive</A></FONT></P><BIG><BIG><SPAN style="FONT-FAMILY: Ringbearer"><SPAN style="TEXT-DECORATION: underline"><SPAN style="FONT-WEIGHT: bold"></SPAN></SPAN></SPAN></BIG></BIG>
<TABLE style="MARGIN-LEFT: auto; WIDTH: 728px; MARGIN-RIGHT: auto; TEXT-ALIGN: left" cellSpacing=2 cellPadding=0 border=0>
<TBODY>
<TR>
<TD style="WIDTH: 150px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha005HCtn.jpg"></TD>
<TD style="WIDTH: 174px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha006HCtn.jpg"></TD>
<TD style="WIDTH: 139px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha007HCtn.jpg"></TD>
<TD style="WIDTH: 152px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha009HCtn.jpg"></TD></TR>
<TR>
<TD style="WIDTH: 157px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha010HCtn.jpg"></TD>
<TD style="WIDTH: 174px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha011HCtn.jpg"></TD>
<TD style="WIDTH: 139px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha016HCtn.jpg"></TD>
<TD style="WIDTH: 152px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha018HCtn.jpg"></TD></TR>
<TR>
<TD style="WIDTH: 157px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha032HCtn.jpg"></TD>
<TD style="WIDTH: 174px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha033HCtn.jpg"></TD>
<TD style="WIDTH: 139px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha041HCtn.jpg"></TD>
<TD style="WIDTH: 152px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha042HCtn.jpg"></TD></TR>
<TR>
<TD style="WIDTH: 150px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha047HCtn.jpg"></TD>
<TD style="WIDTH: 174px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha048HCtn.jpg"></TD>
<TD style="WIDTH: 139px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha057HCtn.jpg"></TD>
<TD style="WIDTH: 152px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha040HCtn.jpg"></TD></TR>
<TR>
<TD style="WIDTH: 157px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha044HCtn.jpg"></TD>
<TD style="WIDTH: 174px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha045HCtn.jpg"><BR></TD>
<TD style="WIDTH: 139px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha046HCtn.jpg"></TD>
<TD style="WIDTH: 152px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha053HCtn.jpg"></TD></TR>
<TR>
<TD style="WIDTH: 157px; HEIGHT: 150px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha054HCtn.jpg"></TD>
<TD style="WIDTH: 174px; TEXT-ALIGN: center"></TD>
<TD style="WIDTH: 139px; TEXT-ALIGN: center"></TD>
<TD style="WIDTH: 152px; TEXT-ALIGN: center"><IMG src="/doubletakestudios/M028766tonsha055HCtn.jpg"></TD></TR></TBODY></TABLE><BR><BR><SPAN style="FONT-FAMILY: Ringbearer"><A href="/Home%20Page%20certain.html">Homepage</A>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <A href="/futureprojects.html">future Projects</A>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<A href="/Experience.html">Experience</A> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <A href="/Photoshoots.html">Photoshoots</A>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <A href="mailto:Contact%20Details.html">Contact Details</A>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <A href="/Links.html">Links</A></SPAN><SPAN style="FONT-FAMILY: Ringbearer"></SPAN><SPAN style="FONT-FAMILY: Ringbearer"></SPAN><BIG><BIG><SPAN style="FONT-FAMILY: Ringbearer"><SPAN style="TEXT-DECORATION: underline"><SPAN style="FONT-WEIGHT: bold"> </SPAN></SPAN></SPAN></BIG></BIG></DIV></BODY>

davescallon
12-05-2009, 03:40 PM
My Daughter set up the site, and roped me in to sort it out, so thanks for all of your help John

Dave