PDA

View Full Version : Javascript slideshow



lmth
02-16-2007, 08:55 PM
1) Script Title: DHTML Slide Show (manual)

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex14/dhtmlslide.htm

3) Describe problem:

I've recently used this on my site to display some site designs i came up with but i'd like to have some text underneath it saying which slide is being shown. e.g. Design 4 of 45

I know it displays that in the staus window in IE but that doesn't work in firefox and it isn't as obvious to most people.

If you could tell me how to do thiss it would help loads! Thanks!

Page address is http://www.bruntnet.com/templates.php

Thanks

lmth

jscheuer1
02-16-2007, 10:44 PM
Change this:


function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}

to:


function keeptrack(){
var dyndat=document.all&&document.all['dyndata']? document.all['dyndata'] : document.getElementById&&document.getElementById('dyndata')? document.getElementById('dyndata') : null;
if(dyndat)
dyndat.innerHTML="Image "+(which+1)+" of "+photos.length;
}

With that change, you can have this wherever you like in the body of the page:


<div id="dyndata">Image 1 of 3</div>

It will display the information, be sure to change 3 to the total number of images.