Ver Mensaje Individual
  #7 (permalink)  
Antiguo 18/10/2003, 07:41
Avatar de meru-kun
meru-kun
 
Fecha de Ingreso: noviembre-2002
Ubicación: Madrid
Mensajes: 854
Antigüedad: 22 años, 2 meses
Puntos: 0
Entiendo más o menos. Y comparando con el código que yo tengo... Veo que es más o menos igual (solo que yo además tengo ASP), y no logro ver donde me puedo haber equivocado.
Te pego el código, para ver si tu (o cualquier otro), me supiera decir que me falta, o que me sobra.
Código:
<script language="javascript">

//Aquí cambia los nombres de las imágenes por las tuyas.
var imagenes=new Array()
var linkref=new Array()
<%
  intI = 0
	strSQL = "SELECT * FROM AFILIADOS"
         Set MRA = MyMensConn.Execute(strSQL)
          Do While Not MRA.EOF Or MRA.BOF
		   If intI = 0 Then
		    txtSrcInicial = MRA("IMG")
			txtAltInicial = MRA("ALT")
			txtUrlInicial = MRA("URL")
		   End If
%>
imagenes[<%=intI%>]=new Image (88,32);
imagenes[<%=intI%>].src="<%=MRA("IMG")%>"
imagenes[<%=intI%>].alt="<%=MRA("ALT")%>"
linkref[<%=intI%>]=new Link;
linkref[<%=intI%>.href="<%=MRA("URL")%>"
<%
           intI = intI + 1
          MRA.MoveNext
         Loop
%>


cont=0
function presImagen()
{
if (document.all){
document.getElementById('autoAfiliados').filters.blendTrans.apply()
document.getElementById('autoAfiliados').src=imagenes[cont].src
document.getElementById('autoAfiliados').alt=imagenes[cont].alt
document.getElementById('autoAfiliados').filters.blendTrans.play()
document.getElementById('autoHref').href=linkref[cont].href
}
else
    {
    document.images.autoAfiliados.src = imagenes[cont].src
	document.images.autoAfiliados.alt = imagenes[cont].alt
	document.links.linkref.href = linkref[cont].href
    }
if (cont < imagenes.length-1)
{cont ++}
else
{cont=0}
tiempo=window.setTimeout('presImagen()',5000)
 //cada (5 seg.) cambia la imagen.
}

</script>
Y luego tengo lo siguiente:
Código:
<a href="visitar.asp?cat=afiliados&url=<%=txtUrlInicial%>" name="linkref" 
target=_blank>
<img id="autoAfiliados" src="<%=txtSrcInicial%>" alt="<%=txtAltInicial%>" 
style="filter:blendTrans(duration=3)" 
width=88 height=31 border=0>