Forskellige farver i rækkerne!
Hej..er der en der kan omskrive nedenstående kode, så alle de ulige rækker har en bgcolor, mens alle de lige rækker har en anden bgcoller...
kan nemlig ikke selv lige få det til at virke :-)
--------------------------------
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ConnRabatDB.asp" -->
<%
var Aalborg = Server.CreateObject("ADODB.Recordset");
Aalborg.ActiveConnection = MM_ConnRabatDB_STRING;
Aalborg.Source = "SELECT * FROM Aalborg ORDER BY ID ASC";
Aalborg.CursorType = 0;
Aalborg.CursorLocation = 2;
Aalborg.LockType = 1;
Aalborg.Open();
var Aalborg_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
Aalborg_numRows += Repeat1__numRows;
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<% while ((Repeat1__numRows-- != 0) && (!Aalborg.EOF)) { %>
<table width="300" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="20" bgcolor="#00CC99"><%=(Aalborg.Fields.Item("ID").Value)%></td>
<td width="60" bgcolor="#00CC99"><%=(Aalborg.Fields.Item("Branche").Value)%></td>
<td width="20" bgcolor="#00CC99"><%=(Aalborg.Fields.Item("Rabat").Value)%></td>
</tr>
</table>
<%
Repeat1__index++;
Aalborg.MoveNext();
}
%>
</body>
</html>
<%
Aalborg.Close();
%>
-----------------------------------
