Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá pessoal, boa tarde.
Gostaria de uma ajuda dos programadores de plantão.
Talvez meu problema seja simples de resolver mas por enquanto minha capacidade técnica em se tratando de asp é pouca.
Vamos lá. Tenho um slideshow ótimo. Sempre uso em meus projetos.
Mas desta vez necessito trazer as informações de uma tabela no bd.
Está ai minha dúvida como trazer essas informações e preencher o array com elas.
Agradeço imensamente quem puder me ajudar.
segue o código já com o recordset que utilizo.
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conexao.asp" -->
<%
Dim atletas
Dim atletas_cmd
Dim atletas_numRows
Set atletas_cmd = Server.CreateObject ("ADODB.Command")
atletas_cmd.ActiveConnection = MM_bdados_STRING
atletas_cmd.CommandText = "SELECT id, apelido, posicao, imagem FROM atletas"
atletas_cmd.Prepared = true
Set atletas = atletas_cmd.Execute
atletas_numRows = 0
%>
<html>
<head>
<style>
.Caption {
font-family: Arial;
font-weight: bold;
color: #123456;
}
body {
background-color: #000000;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<script>
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;
var Picture = new Array();
var Caption = new Array();
var Position = new Array();
// Specify the image files...
Picture[1] = 'atletas/marcelo.gif';
Picture[2] = 'atletas/robson.gif';
// Specify the Captions...
Caption[1] = "Marcelo";
Caption[2] = "Robson";
Position[1] = "Goleiro";
Position[2] = "Zagueiro";
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.getElementById) document.getElementById("PositionBox").innerHTML= Position[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body onload=runSlideShow()>
<table border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td width=150 height=152>
<img src=atletas/fundo.gif name=PictureBox width=150 height=152> </td>
</tr>
<tr>
<td id=CaptionBox class=Caption align=center bgcolor=#fedcba>. </td>
</tr>
<tr>
<td id=PositionBox class=Caption align=center bgcolor=#fedcba> </td>
</tr>
</table>
</body>
</html>
<%
atletas.Close()
Set atletas = Nothing
%>Carregando comentários...