Prøv dette:
<%
kategori = request.querystring("kategori")
side = request.querystring("side")
str_alfa = request.querystring("alfa")
bo_start = true
do while len(str_alfa) > 0
if bo_start = true then
str_sql1 = " left(navn,1) = '" & left(str_alfa, 1) & "'"
bo_start = false
else
str_sql1 = str_sql1 & " or left(navn,1) = '" & left(str_alfa, 1) & "'"
end if
str_alfa = right(str_alfa, len(str_alfa) - 1)
loop
Set Conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("ringetoner.mdb")
str_sql2 = "SELECT * FROM ringetoner WHERE godkendt='Ja' AND " & str_sql1 & " AND kategori = '" & kategori & "' ORDER BY navn"
rs.Open str_sql2, conn, 1
%>
<SCRIPT language=javascript>
function se(id,h,b) {
window.open("popup.asp?id="+id,"new",
"resizable=0,scrollbars=1,toolbar=0,location=0,menubar=0,status=0,width="+b+",height="+h)
}
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Language" content="da">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Play2day</title>
</head>
<body topmargin="0" leftmargin="0">
<div align="center">
<table border="0" width="802" cellspacing="0" cellpadding="0" height="12" style="border-top: 1 solid #000000; border-bottom: 1 solid #000000">
<tr>
<td width="100%" height="12">
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#2C7DBA" height="21">
<tr>
<td width="100%" height="21" style="border-bottom: 1 solid #000000" bgcolor="#DF613C">
<p align="left"><b><font face="verdana, arial" size="1" color="#FFFFFF">Play2day.dk
- Danmarks mest populære spil side!</font></b></td>
</tr>
</table>
</td>
</tr>
<center>
<tr>
<td width="100%" height="74">
<table border="0" width="124%" height="60" cellspacing="0" cellpadding="0">
<tr>
<td width="300" height="40"><a href="
http://www.newsdirect.dk/default.asp"><img src="newsdirectlogo.gif" border="0" width="300"
height="60"></a></td>
<td width="486%" height="40"><!-- #include file="banner.asp" -->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="31">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="19">
<tr>
<td width="100%" bgcolor="#DF613C" style="border-top: 1 solid #000000; border-bottom: 1 solid #000000" height="19">
<p align="center"><b><font size="1" face="Verdana" color="#FFFFFF">Hjem
l Spil l Konkurrencer
l </font></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="1" valign="top">
<table border="0" width="804" cellspacing="0" cellpadding="0" height="184">
<tr>
<td width="149" rowspan="2" height="184" valign="top">
<!-- #include file="menu.asp" -->
</td>
<td width="18" valign="top" rowspan="2" height="184">
<table border="0" width="17" cellspacing="0" cellpadding="0" background="middle.gif">
<tr>
<td width="100%">
<p align="center"><font color="#FFFFFF"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></td>
</tr>
</table>
</td>
<td width="463" height="184" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="35">
<tr>
<td width="100%" height="14" bgcolor="#DF613C">
<p align="center"><font color="#FFFFFF" size="2" face="verdana, arial">-
Spil -</font></p>
</td>
</tr>
<tr>
<td width="100%" height="21">
<p align="center"><font color="#FFFFFF"><br>
</font></p>
<div align="center">
<center>
<table height="43" width="427" bgColor="#000000" cellspacing="1">
<tr>
<td vAlign="middle" width="236" bgColor="#DF613C" height="19"><b><font size="1" face="Verdana" color="#FFFFFF">Navn
på spillet</font></b></td>
<td vAlign="middle" width="168" bgColor="#DF613C" height="19"><b><font size="1" face="Verdana"
color="#FFFFFF">Telefon:</font></b></td>
<td vAlign="middle" width="138" bgColor="#DF613C" height="19"><b><font size="1" face="Verdana" color="#FFFFFF">Hits:</font></b></td>
</tr>
<%
' ***************paging top
If request.Querystring("side") <> "" Then
page = request.Querystring("side")
else
page = 1
end if
If Not (rs.BOF Or rs.EOF) Then
rs.PageSize = 20
rs.AbsolutePage = Page
intRecCount = rs.PageSize
intPageCount = rs.PageCount
'paging-halløj
'If intPageCount > 1 Then
Response.Write "Page: "
For intNum = 1 To intPageCount
If lastItem > rs.RecordCount Then
lastItem = rs.RecordCount
End if
intPage = int(page)
If intNum = intPage Then
response.Write intNum & " "
Else
Response.Write "<a href='?alfa=a&kategori=" & kategori & "&side=" & intNum & "'>"
response.Write intNum & "</a> "
End if
Next
'End if
' *******************//paging top slut
Do While Not rs.EOF And intRecCount > 0
%>
<tr>
<td vAlign="top" width="534" bgColor="#FFFFFF" height="16"><a href="java script:se("<% = rs("id") %>",400,480)"><font
face="verdana, arial" size="1" color="#000000"><% = rs("navn") %>
</font></a></td>
<td vAlign="top" width="316" bgColor="#FFFFFF" height="16"><font face="verdana, arial" size="1" color="#000000"><% = rs("tilmobil") %>
</font></td>
<td vAlign="top" width="138" bgColor="#FFFFFF" height="16"><font color="#000000" size="1" face="verdana, arial"><% = rs("setgange") %>
</font></td>
</tr>
<%
intRecCount = intRecCount - 1
rs.MoveNext
Loop
End if
%>
</table>
</center>
</div>
<p align="center"><font color="#FFFFFF">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></p>
</td>
</tr>
</table>
</td>
</center>
<td width="18" valign="top" rowspan="2" height="184">
<table border="0" width="17" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" background="middle.gif">
<p align="center"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</td>
</tr>
</table>
</td>
<center>
<td width="150" valign="top" rowspan="2" height="184">
<div align="right">
<table border="0" width="149" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top"><!-- #include file="menu2.asp" -->
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="463" height="21"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%
rs.Close
Set rs = Nothing
Conn.Close
Set Conn = Nothing
%>
I din includede fil menu udskriver du så linksene således:
<a href="?alfa=a&kategori=spil&side=1">Spil</a>
<a href="?alfa=a&kategori=braetspil&side=1">Brætspil</a>
osv.
Når du får implementeret bogstavvalg (alfa), skal det naturligvis inkluderes i querystrin'ene.