Try this:
The link from link.asp would look like this:
respone.write("<a href='link.asp?topic_id=" & rs("Topic_ID") &_
"&reply_id=" & rs("reply_id") &_
"#" & rs("reply_id") & "'>")
(I broke up the line above using &_ so it fit within a decent window size here, change to suit your needs.)
Add this to the Select Statement that you referenced above:
Case "link"
with rs
if .recordcount <> 0 then
'set recordset filter
.filter = ("REPLY_ID > '" & request.querystring("reply_id") & "'")
if .recordcount = 1 then
.movefirst
newrecpos = .absoluteposition
if ((newrecpos mod strPageSize) > 0) then
mypage = Int(Abs(newrecpos/strPageSize))+1
else
mypage = Int(Abs(newrecpos/strPageSize))
end if
end if
end if
'take out filter
.filter = ""
end with
rs.absolutepage = mypage
Probably a better thing is to embed a Select Statement for the portion of setting the filter. That's the only thing that really changed between the two Case sections.
I think this latter idea is what I will do:
strJump = request("jump")
Select Case strJump
Case "lastpost"
rs.absolutepage = maxpages
mypage = maxpages
Case "newpost","link"
with rs
if .recordcount <> 0 then
'set recordset filter
Select Case strJump
Case "newpost"
.filter = ("R_DATE > '" & lastDate & "'")
Case "link"
.filter = ("REPLY_ID > '" & request.querystring("reply_id") & "'")
End Select
if .recordcount = 1 then
.movefirst
newrecpos = .absoluteposition
if ((newrecpos mod strPageSize) > 0) then
mypage = Int(Abs(newrecpos/strPageSize))+1
else
mypage = Int(Abs(newrecpos/strPageSize))
end if
end if
end if
'take out filter
.filter = ""
end with
rs.absolutepage = mypage
Case Else
rs.absolutepage = mypage
End Select
The Writer Community
"Do not go where the path may lead, go instead where there is no path and leave a trail."
-Ralph Waldo Emerson
Edited by - work mule on 08 June 2001 18:22:43