Sådan så den ud fra starten:
<% Response.Buffer = True %>
<html><head>
<title>Søgeresultat</title>
<STYLE>
td { font-family : Tahoma; font-size : 8pt; color : silver; }
h1 { font-size : 8pt; font-weight : none; color: #333333; margin: 0px; }
h2 { font-size : 8pt; font-weight : none; color: #333333; margin: 0px; }
small { font-size : 8pt; }
A:link {text-decoration: none; color: #2392F9}
A:visited {text-decoration: none; color: #2392F9}
A:active {text-decoration: none; color: #0000ff}
A:hover {text-decoration: underline; color: ffffff}
</STYLE>
</head>
<body VLINK="#363754" LINK="#363754" BGCOLOR="#224467" TEXT="ffcc00" alink="#363754" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script>
function liste(page) {
window.open(page, "CtrlWindow","maksimer=off,toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,width=300,height=300,"); }
</script>
<%
strKeyword = Trim(Request.Form("Keyword"))
If Len(strKeyword) = 0 Then Response.Clear
Response.Redirect("search.htm")
Else
strKeyword = Replace(strKeyword,"'","''")
End If
strSQL = "SELECT ID, fil, størrelse, kategori, Beskrivelse, dato, download, navn, email FROM Kunder WHERE"
strSQL = strSQL & " (fil LIKE '%" & strKeyword & "%')"
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("search_2000.mdb")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
Set rs = myConn.Execute(strSQL)
If Not (rs.BOF Or rs.EOF) Then %>
<center> | <a href='search.htm'><b>Søg igen</a> | <a href='
http://www.adichat.dk'>Forsiden</a> | <p>
<center><table border='0' cellspacing='0' height='1'>
<tr valign='center'><td colspan='2' height='1' bgcolor='#000000'>
<b><font face='verdana' size='2' color='ffffff'>Søgeresultat:</b></font>
<table align='center' bgcolor='#262636' cellspacing='0' cellpadding='0' border='0'>
<TABLE CELLSPACING='1' CELLPADDING='4' BORDER='0'><TR BGCOLOR='363754'>
<HR WIDTH='100%' COLOR='#585858' SIZE='1'><font size='1'></tr>
<tr><td>Filnavn</td><td>Størrelse</td><td>Kategori</td><td>Info</td><td>Download</td>
<% Do While Not rs.EOF %>
</tr><TR BGCOLOR='363754'><td> <%=rs("fil")%> </td>
<td> <%=rs("størrelse")%> kb.</td>
<td> <%=rs("kategori")%> </td>
<td><a href="java script:liste('info.asp?id=<%=rs("id")%>')"><img src='info.gif' border='0' alt='Info'></a>
<td><a href="<%=rs("download")%>"><%=rs("download")%></a></td>
<% rs.MoveNext
Loop
Else
Response.Write "<p>Der er ikke fundet noget på denne søgning</p>"
End If
myConn.Close
Set myConn = Nothing
%></td></tr>
<TR BGCOLOR='363754'><td><HR COLOR='#585858' width="100%" SIZE='1'><font size='1'></TD></TR></TABLE></TD></TR></TABLE></table>
</table>
Og sådan som du mener den skal være:
<!-- #include file="adovbs.inc" -->
<% Response.Buffer = True %>
<html><head>
<title>Søgeresultat</title>
<STYLE>
td { font-family : Tahoma; font-size : 8pt; color : silver; }
h1 { font-size : 8pt; font-weight : none; color: #333333; margin: 0px; }
h2 { font-size : 8pt; font-weight : none; color: #333333; margin: 0px; }
small { font-size : 8pt; }
A:link {text-decoration: none; color: #2392F9}
A:visited {text-decoration: none; color: #2392F9}
A:active {text-decoration: none; color: #0000ff}
A:hover {text-decoration: underline; color: ffffff}
</STYLE>
</head>
<body VLINK="#363754" LINK="#363754" BGCOLOR="#224467" TEXT="ffcc00" alink="#363754" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script>
function liste(page) {
window.open(page, "CtrlWindow","maksimer=off,toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,width=300,height=300,"); }
</script>
<%
strKeyword = Trim(Request.Form("Keyword"))
If Len(strKeyword) = 0 Then
Response.Clear
Response.Redirect("search.htm")
Else
strKeyword = Replace(strKeyword,"'","''")
End If
strSQL = "SELECT ID, fil, størrelse, kategori, Beskrivelse, dato, download, navn, email FROM Kunder WHERE"
strSQL = strSQL & " (fil LIKE '%" & strKeyword & "%')"
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("search_2000.mdb")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
set rs=Server.CreateObject("adodb.Recordset")
rs.open myConn, strSQL, adopenstatic
howmanyrecs=rs.recordcount
response.write howmanyrecs & " poster."
%>
<center> | <a href='search.htm'><b>Søg igen</a> | <a href='
http://www.adichat.dk'>Forsiden</a> | <p>
<center><table border='0' cellspacing='0' height='1'>
<tr valign='center'><td colspan='2' height='1' bgcolor='#000000'>
<b><font face='verdana' size='2' color='ffffff'>Søgeresultat:</b></font>
<table align='center' bgcolor='#262636' cellspacing='0' cellpadding='0' border='0'>
<TABLE CELLSPACING='1' CELLPADDING='4' BORDER='0'><TR BGCOLOR='363754'>
<HR WIDTH='100%' COLOR='#585858' SIZE='1'><font size='1'></tr>
<tr><td>Filnavn</td><td>Størrelse</td><td>Kategori</td><td>Info</td><td>Download</td>
<% Do While Not rs.EOF %>
</tr><TR BGCOLOR='363754'><td> <%=rs("fil")%> </td>
<td> <%=rs("størrelse")%> kb.</td>
<td> <%=rs("kategori")%> </td>
<td><a href="java script:liste('info.asp?id=<%=rs("id")%>')"><img src='info.gif' border='0' alt='Info'></a>
<td><a href="<%=rs("download")%>"><%=rs("download")%></a></td>
<% rs.MoveNext
Loop
Else
Response.Write "<p>Der er ikke fundet noget på denne søgning</p>"
End If
myConn.Close
Set myConn = Nothing
%></td></tr>
<TR BGCOLOR='363754'><td><HR COLOR='#585858' width="100%" SIZE='1'><font size='1'></TD></TR></TABLE></TD></TR></TABLE></table>
</table>