On Sat, 6 Oct 2001 21:47:06 +0200, "JS" <stecher@mail.dk> wrote:
>I forbindelse med visningen indholdet i en database vil jeg gerne have hver
>anden linie farvelagt med en baggrundsfarve.
<%
If Request.Querystring("vis") = "alle" Then
SQLstmt = "SELECT * FROM tabel"
Conn.Execute (SQLstmt)
Set rs = conn.Execute(SQLstmt)
bgfarve = "#FFFFFF"
If rs.eof then
response.write "Der er ingen poster i databasen!"
response.end
End If
%>
<TABLE BORDER="0" cellspacing="0" cellpadding="0">
<TR>
<TD>Navn</TD>
</TR>
</TABLE><BR>
<%
DO WHILE NOT rs.EOF
if bgfarve = "#FFFFFF" then
bgfarve = "#EAEAEA"
else bgfarve = "#FFFFFF"
end if
%>
<TABLE BORDER="0" cellspacing="0" cellpadding="0"
bgcolor="<%=bgfarve%>" width="100%">
<TR>
<TD width="80"><%=rs("navn")%></TD>
</TR>
</TABLE>
<%
rs.MoveNext
LOOP
RS.Close
conn.Close
Set conn = nothing
Set SQLstmt = nothing
End If
%>
/Goose
--
<URL:mailto:webmaster@goose.dk>
<URL:
http://www.goose.dk>