Ho il seguente codice che vorrei trasformare in 3 colonne.
Il codice mi estrae il campo, la categoria (3 sole categorie) e sotto la categoria i vali record di categoria. vorrei impaginare, sotto a campo, i record divisi per categoria in 3 colonne e non di seguito.
Ho provati diverse volte seguendo vari post ma non ci sono riuscito.
Mi potete dare una mano?
il codice è il seguente:
codice:
<%@LANGUAGE="VBSCRIPT"%>
<%Option Explicit%>
<html>
<head>
<script src="lib/prototype.js" type="text/javascript"></script>
<script src="src/scriptaculous.js" type="text/javascript"></script>
<link rel='stylesheet' type='text/css' href='stylenew.css'></link>
<script language='Javascript'>
var currentShow = "";
function showIt(id) {
var thisTitle = document.getElementById('title'+id);
var thisClose = document.getElementById('close'+id);
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.color = '#ffffff';
thisTitle.className = "activeTitle";
thisClose.style.display = 'block';
new Effect.SlideDown('details'+id);
currentShow = name;
}
function hideIt(id) {
var thisTitle = document.getElementById('title'+id);
var thisClose = document.getElementById('close'+id);
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.color = '#ffffff';
thisTitle.className = "";
thisClose.style.display = 'none';
new Effect.SlideUp('details'+id);
//currentShow = name;
}
</script>
<style type="text/css">
.piccolo {
font-family: Arial;
font-size: 12px;
}
</style>
</head>
<body class=''>
<%
Dim objConn, strfigspConn, objRs, objRs2, strsql, miocampo, cat, perc, colpi, media, imedia, spec
strfigspConn = Application("dbfigspconn")
strsql = "Select record.*, campi.* from record INNER JOIN campi ON record.ID_campo = campi.id order by record.id_campo, record.categoria='Maschile', record.categoria='Femminile', record.categoria='Squadre', record.percorso, record.anno, campi.ID_spec asc"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strfigspConn
Set objRs = Server.CreateObject("ADODB.Recordset")
set objRs = objConn.Execute(strsql)
%>
<table width="1000px" cellspacing='0' cellpadding='0' class='expTable' align="center">
<%
mioCampo=""
Dim iCount
iCount = 0
Function special(id_spec)
if (id_spec) = 1 Then
id_spec = Minigolf
End if
End Function
Do while Not objRs.EOF
IF mioCampo<>objRs("campo") THEN
mioCampo=objRs("campo")
iCount = iCount + 1
%>
<tr id='title<%= icount %>' class='title'>
<td width="30%" bgcolor="#C0C0C0" class='titleHeader' onclick="showIt(<%= icount %>);"><font style: face="Tahoma" color="navy">
- <nobr><font style: face="Tahoma" color="navy"><%= objRs("campo") %></font></nobr></font></td>
<td width="60%" bgcolor="#C0C0C0"><font style: face="Tahoma" color="navy"> -
</td>
<td width="10%" bgcolor="#C0C0C0" valign='top'><div id='close<%= iCount %>' style='display: none'>)"/><font style: face="Tahoma" color="navy">close</font></div></td>
</tr>
<tr>
<td colspan='4'>
<div id='details<%= icount %>' style='display: none'>
<div class='moredetails<%= iCount %>'>
<%
end if
%>
<table border="1px" bordercolor="#999999" style="border-style:none; border-width:1px; border-color:black" width='100%' cellspacing="0" cellpadding="0">
<%
IF cat<>objRs("categoria") THEN
cat=objRs("categoria")
%>
<tr><td colspan="5" align="center"><%= objRs("categoria") %></td></tr>
<tr>
<td align="center" style="width: 10%"><b class="piccolo">Perc.[/b]</td>
<td align="center" style="width: 10%"><b class="piccolo">Colpi[/b]</td>
<td align="center" style="width: 10%"><b class="piccolo">Media[/b]</td>
<td align="center" style="width: 10%"><b class="piccolo">Anno[/b]</td>
<td align="center" style="width: 60%"><b class="piccolo">Giocatore[/b]</td></tr>
<%
end if
IF perc<>objRs("percorso") THEN
perc=objRs("percorso")
%>
<tr>
<td width="10%" align="center" class="piccolo"><%= objRs("percorso") %></td>
<%
else
%>
<tr><td align="center" width="10%" class="piccolo"></td>
<%
end if
IF colpi<>objRs("colpi") THEN
colpi=objRs("colpi")
' COLORI MINIGOLF
%>
<%
else
%>
<td align="center" style="width: 10%" class="piccolo"></td>
<%
end if
imedia = objRs("colpi") / objRs("percorso")
IF media<>imedia THEN
media = imedia
'HO INSERITO I COLORI
%>
<%
else
%>
<td align="center" style="width: 10%" class="piccolo"></td>
<%
end if
%>
<td width="10%" align="center" class="piccolo"><%= objRs("anno") %></td>
<td width="60%" align="left" class="piccolo"> <p style="margin-left: 10px"><%= objRs("giocatore") %></p></td>
</tr>
</table>
<%
objRs.MoveNext
Loop
%>
</div>
</div>
</td>
</tr>
<%
Response.Write "</table>"
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
%>
<tr>
<td></td>
</tr>
</table>
</body>
</html>
Grazie