Buen dia quisiera que me pudieran ayudar porfavor con el siguiente problema tengo este codigo pero quisiera mostrar el array de forma dinamica es decir que haga el array de un directorio donde atraves de una url que le pase por medio de una BD, y no tener que estar poniendo manualmente las imagenes sino que al darle el url del directorio las cree automaticamente.
Código:
<script language="JavaScript1.1">
var photos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
photos[0]="immagine01.jpg"
photos[1]="immagine02.jpg"
photos[2]="immagine03.jpg"
photos[3]="immagine04.jpg"
photos[4]="immagine05.jpg"
function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which]
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
}
else window.status='End of gallery'
}
</script>
es decir en vez de estar escribiendo manuelmente esto que sea automaticamente
Código Javascript
:
Ver original/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
photos[0]="immagine01.jpg"
photos[1]="immagine02.jpg"
photos[2]="immagine03.jpg"
photos[3]="immagine04.jpg"
photos[4]="immagine05.jpg"
espero haberme explicado bien
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
muchas gracias por su ayuda