Dynamic paging using divs and Javascript
Posted
by jethomas
on Stack Overflow
See other posts from Stack Overflow
or by jethomas
Published on 2010-04-04T21:40:48Z
Indexed on
2010/04/04
21:43 UTC
Read the original article
Hit count: 307
I have a recordset loop that creates a table, and every 9 items it wraps a div around them so basically looks like:
<div>
<table>rs1, rs2 ----> rs9</table>
</div>
<div>
<table>rs10, rs11 ----> rs18</table>
</div>
etc...
Now, I want it so at first only the first div is showing and the others are hidden, but I have ASP loop that generates clickable links for the various divs (pages) and clicking on any given link will show that div and hide all the others.
Here is the asp code I have so far:
Dim i
If totalPages > 1 Then
Response.Write("<div id='navigation'>")
For i=1 to totalPages
Response.Write ("<a href='' onlick=''>"& i &"</a> | ")
Next
Response.Write("</div>")
End If
Now I just need to figure out the javascript...
© Stack Overflow or respective owner