|
I have this code below in a page called '/forum/bookdates_opt.html'.
<%
set rscount=con.execute("select count(*) from trip_master where agencyid = '"&agencyid&"' and regular_trip = 'Option'")
count_rows = rscount("count(*)") ' number of rows in the db that is option
count_rows_div = count_rows/50
pages = round(count_rows_div)
Dim intRecordsPerPage
intRecordsPerPage = 50 ' how many records (bookings) are shown on each page
Dim queryPageOn
queryPageOn = count_rows
If NOT isNumeric(queryPageOn) then
queryPageOn = "1"
End If
queryPageOn = CINT(queryPageOn)
Response.Write(sProjectPrev & " ")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'# Create Page Numbers & Links
' Creates 'Page' and '1', '2', '3' and so on,.....
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
response.Write "<table border=0 align=center bordercolor=#000000 width=200>"
response.Write "<tr><td align=center>"
Dim iPages, iPagesTemp
response.write "<font face=verdana size=2>Page </font>"
For iPages=1 to pages
iPagesTemp = iPages-1
If NOT queryPageOn=iPages then
Response.write "<a href='?vara=" & iPagesTemp*intRecordsPerPage & "&timeoption="&timeoption&"&searchby="&user&"&agencyid="&agencyid&"' ><font face=verdana size=2><b>" & iPages & "<b></font></a> "
Else
Response.write "<span class='greyt'>[</span><a href='?vara=" & iPagesTemp*intRecordsPerPage & "&page="& iPages & "'>" & iPages & "</a><span class='greyt'>]</span>"
End If
Next
Response.Write(""&sProjectNext)
response.write "</td></tr>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Creates 'Previous' and 'Next' buttons to skip forwards and back from page to page '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sStartQuery = vara
response.write "<tr><td align=center>"
If sStartQuery = "" or sStartQuery = "0" then 'The 'PREVIOUS' link is DISABLED
sProjectPrev = "<a span class='sgrey'>Previous</span>"
response.write "<a span class='sgrey'>Previous</span>"
ElseIf sStartQuery > 0 then ' The 'PREVIOUS' link is ENABLED
sProjectPrev = "<a class='elinks' href='?start=" & sStartQuery - intRecordsPerPage & "'>Previous</span>"
response.write "<a class='elinks' href=# onclick='javascript: history.back()' title='Previous 50 Bookings'>Previous</span></a>"
End If
eEndQuery = sStartQuery+intRecordsPerPage
response.write " "
sMaxStart = (intPages*intRecordsPerPage)-intRecordsPerPage
If eEndQuery > count_rows then ' The 'NEXT' link is DISABLED
sProjectNext = "<a span class='sgrey'>Next</span>"
response.write "<a span class='sgrey'>Next</span>"
ElseIf eEndQuery < count_rows then ' The 'NEXT' link is ENABLED
sProjectNext= "<a class='elinks' href='?vara=" & iPagesTemp*intRecordsPerPage & "'>Next</span>"
response.write "<a class='elinks' href='?vara=" & sStartQuery + intRecordsPerPage & "&timeoption="&timeoption&"&agencyid="&agencyid&"&searchby="&user&"' title='Next 50 Bookings'>Next</span>"
End If
response.write "</td></tr>"
response.write "</table>"
%>
It gives me a Page 1-2-3-4 etc.... at the foot of the page and it also give me a 'Next' and 'Previous' button, which all work fine.
What i am looking for is that when it says 'Page 1-2-3-4' etc.... then it UNDERLINES or HIGHLIGHTS the page that you are on.
For example, if you click '2' or click 'Next' to go to page two then '2' is underlined or has a [2] around it.
Similar to Google:
http://www.google.co.uk/search?q=st.+patrick's+day
Any ideas guys?
Thanks in advance.
Picco
|
|
|
|
|
|
|
|