I'm not sure if this is the easiest and cleanest approach, but I would make that all part of a form with no action. So basically, it's a form that submits to itself. You would then set up a hidden input field that would by default have the value of 1 (to be used as your pointer to what record to start on). Put a counter in your code that only 10 records (or however many) display. Something like this:
Code:
<%
'Set up connection to database and recordset here
%>
<html>
<head><title>Guestbook</title>
<script language="JavaScript">
<!--
function nextRec()
{
// Add 10 to startRec value and then submit form
document.myform.startRec.value = document.myform.startRec.value + 10
document.myform.submit()">
}
-->
</script>
</head>
<body>
<form name="myform" method="post">
<%
If CInt(Request.Form("startRec")) > 1 Then
Response.Write "<input type=""hidden"" name=""startRec"" value=""" &
Request.Form("startRec") & """>"
Else
Response.Write "<input type=""hidden"" name=""startRec"" value=""1"">"
End If
%>
<%
'Loop from document.myform.startRec.value to
'document.myform.startRec.value + 10
'and print the records here
%>
<!-- The link below adds 10 to the startRec value
for the next page to use for the start record
and then submits the page
-->
<input type="button" onClick="nextRec()" value="Next Page">
</form>
<% 'Close database and recordset connection here %>
</body>
</html>
I haven't tested this, so not sure how it'd work, but it seems plausible. With some modifying, you could also get it to go back to previous records too. Hope this gives you some direction.
-Shane