Ciao,
innanzi tutto volevo ringraziare per tutte le volte che mi aiutate!!!
Ho una lacuna ...
Devo fare una pagina di catalogo con foto e descrizione prendendo i dati dal db, il problema è che so "formattarli" solo uno sotto l'altro: foto a sinistra - testo a destra e così via tutti uguali.
Se io volessi alternare: primo record foto a sinistra e testo a destra, secondo record foto a destra e testo a sinistra e così via ... come dovrei fare???
Mando qui sotto il codice attuale (record tutti uguali uno sotto l'altro),
mi potreste aiutare? Grazie mille!
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim scheda_tech
Dim scheda_tech_numRows
Set scheda_tech = Server.CreateObject("ADODB.Recordset")
scheda_tech.ActiveConnection = MM_database_STRING
scheda_tech.Source = "SELECT * FROM scheda_tecnica order by id DESC"
scheda_tech.CursorType = 0
scheda_tech.CursorLocation = 2
scheda_tech.LockType = 1
scheda_tech.Open()
scheda_tech_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
scheda_tech_numRows = scheda_tech_numRows + Repeat1__numRows
%>
<html>
<head>
<TITLE>catalogo</TITLE>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0">
<a name="cima"></a>
<% While ((Repeat1__numRows <> 0) AND (NOT scheda_tech.EOF)) %>
<table width="650" border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="4" height="15"></td></tr>
<tr><td width="50"></td>
<td width="150" valign="middle">[img]imgfile.asp?ID=<%=(scheda_tech.Fields.Item([/img]" width="150" height="195"></td>
<td width="50"></td>
<td width="400" class="testi1" valign="middle">Titolo : <%=(scheda_tech.Fields.Item("titolo").Value)%>
Descrizione :
<font class="testipic"><%=(scheda_tech.Fields.Item("desc rizione").Value)%></font>
</td></tr>
<tr>
<td width="50"></td>
<td width="150" height="15" valign="middle"><div align="center">" class="testi1" onClick="MM_openBrWindow('view.asp?id=<%=(scheda_t ech.Fields.Item("id_filesHi").Value)%>','mostra',' width=250,height=325')">ingrandisci immagine</div></td>
<td colspan="2"></td></tr></table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
scheda_tech.MoveNext()
Wend
%>
<table width="650" border="0" cellpadding="0" cellspacing="0">
<tr><td height="20" class="testi1" valign="bottom"><div align="center">torna su</div></td>
</tr></table>
</body>
</html>
<%
scheda_tech.Close()
Set scheda_tech = Nothing
%>

Rispondi quotando