Hola
A ver si esto funciona
+ Usas GetRows() para tener todos los registros en un array
+ Ahora un ciclo
Código ASP:
Ver originalvalores = ""
For i = 0 to UBound(registros,2)
valores = valores & registros(0,i) & ","
Next 'i
+ Ahora en javascript
Código Javascript
:
Ver originalvar ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false
var ns6 = (document.getElementById)? true:false
var b=0;
var noticia = [<%=Left(valores,Len(valores)-1)%>];
function obj(x){
if (ns6)
{
return document.getElementById(x);
}
else if (ie4)
{
return document.all[x];
}
else if (ns4)
{
return document.layers[x];
}
else
{
return null;
}
}
function mostrar(a){
obj("t_noticia").innerHTML=noticia[a].titulo;
}
function cambiar(incr){
b=(noticia.length>b+incr)?b+incr:0;
if(b==-1){
b=noticia.length-1;
}
mostrar(b);
}
+ En el body
Código HTML:
Ver original<a href="#" onClick="cambiar(-1);">Anterior
</a> |
<a href="#" onClick="cambiar(1);">Siguiente
</a></td>
Suerte