Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/02/2003, 10:36
Avatar de obi-alf
obi-alf
 
Fecha de Ingreso: febrero-2003
Ubicación: Madrid
Mensajes: 119
Antigüedad: 22 años
Puntos: 0
avanzar retroceder imagenes

Bueno, pues he encontrado un javascript que se ajusta a lo que quiero, asi que lo posteo.

Avanzar y retroceder imágenes mediante <anterior | siguiente>

**meter este código entre <head> y </head>

<script LANGUAGE="JavaScript">
// slider wbc /with button control
// javascriptfacil · www.javascriptfacil.com
var myPix = new Array("imagen01.gif","imagen1gif","imagen2gif","im agen3gif")
var thisPic = 0
function processPrevious() {
if (document.images && thisPic > 0) {
thisPic--
document.myPicture.src=myPix[thisPic]
}
}
function processNext() {
if (document.images && thisPic < 3) {
thisPic++
document.myPicture.src=myPix[thisPic]
}
}</script>


Y luego entre celdas esto (como ejemplo)

<tr>
<td height="375" align="center"><img SRC="imagen01.gif" WIDTH="128" HEIGHT="128" VSPACE="0" HSPACE="0" BORDER="0" LOOP="0" NAME="myPicture"></td>
</tr>
<tr>
<td height="25"><div align="center"><a HREF="javascript:processPrevious()">&lt;&lt;Anteri or</a>&nbsp;|&nbsp;<a HREF="javascript:processNext()">Siguiente&gt;&gt;</a></div></td>
</tr>

*se pueden añadir tantas imágenes como se quieran
__________________
corto!