I have a record set with hundreds of rows. when a user clicks the row they go somewhere else and later get redirected to the page with the rows again. I want the page to start on the exact row the clicked on.
I have rows set up with a line number corresponding to each record number from the database.
//some record set
while not RS.eof
<a name="<%=line%>">
//other stuff
Rs.movenext
Line = line + 1
wend
when you put ‘#’ in the url and a number it goes to the line number. However, my issue is that the url is off limits. I have the line number stored as a Session variable that happens after they initially leave the page. How can i get the page to go to the line number using the session variable and not the url?
As far as I know, anchor names are a feature of the browser. But there are possibly some Javascript libraries that can scroll down to an anchor name without needing the url.
Here’s an SO Question on how to programatically scroll down to a certain location.
I think this works also but I haven’t tested it