Author |
Topic  |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 05 February 2003 : 05:17:17
|
I'm changing the DVDs page on my site so it won't display "previous page" and "next page" buttons anymore, but instead it'll show text links to each individual page. I have it working (offline) but need to find out how to display things. Here are some options: You're on page 2 of 4 |1|2|3|4|
[imagine the black text is on the left and the red is centered] You're on page 2 of 4 |1|2|3|4|
You're on page 2 of 4
|1|2|3|4|
|1|2|3|4|
Maybe you can think of something else I could do to make this look nicer and easier to understand? |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 05 February 2003 : 05:38:05
|
I've used the second "option" for now, as you can see on http://www.frutzle.com/dvds/ However, I'm not sure this is the best way... any ideas and/or comments are welcome  |
 |
|
seven
Senior Member
   
USA
1037 Posts |
Posted - 05 February 2003 : 08:12:44
|
Make the links small CD images with the page numbers on top of the CD's to navigate...
...I don't know.
or...
1-10 | 11-20 | 21-30 | 31-40 |
|
 |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 05 February 2003 : 08:39:32
|
The images instead of text links sound nice. I might do that. Using 1-10 | 11-20 etc, or in my case 1-25 | 26-50 | 51 - 75 etc. would require a lot more work, but should be doable too. At least it'd fill the page a bit more  |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 05 February 2003 : 09:16:12
|
<edited to correct the code>
Frutzle that should not be difficult. You can just have a procedure to do that.
sub PageLinks(strPageSize, currentPage, Totalpages)
Dim iPage
if TotalPages > strPageSize then
Response.Write (vbNewLine & _
"You are on page " & currentpage & " of " & TotalPages & " Pages. ")
for iPage = 1 to TotalPages step strPageSize
if iPage = 1 then
Response.Write (vbNewLine & iPage & "-" & strPageSize)
elseif ((iPage * strpageSize) < TotalPages) then
Response.Write (vbNewLine & " | " & ((iPage * strPageSize) + 1) & "-" & (iPage * strPageSize))
else
Response.Write (vbNewLine & " | " & ((iPage * strPageSize) + 1) & "-" & (TotalPages))
end if
next
end if
end sub call this procedure with the following statement
Call PageLinks(strPageSize, currentPage, TotalPages) |
Edited by - GauravBhabu on 05 February 2003 15:01:28 |
 |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 05 February 2003 : 09:30:21
|
I had something like that in mind, but I don't know if that's how I want to display those links. All I know so far is that a CD image becomes unrecognizable when it's about 12x12 pixels so that's not an option. I'll take a look at some other images that might work.
Thanks for the codes Gaurav I might need that as an example if I do end up showing the links like that. |
 |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 05 February 2003 : 11:10:30
|
Here's a simplified version (some stuff removed to keep things a little shorter) of what I use:
Sub Paging()
Response.Write " <td nowrap valign=""top"" align=""center"">|</td>" & vbNewLine
intPage = 0
Do Until (intPage = TotalPages)
intPage = intPage + 1
if ((intPage * RecPerPage) + 1) > strResultsCount Then
Response.Write " <td nowrap valign=""top"" align=""center""> " & (((intPage - 1) * RecPerPage) + 1) & "-" & strResultsCount & " </td>" & vbNewLine
else
Response.Write " <td nowrap valign=""top"" align=""center""> " & (((intPage - 1) * RecPerPage) + 1) & "-" & (intPage * RecPerPage) & " </td>" & vbNewLine
end if
Response.Write " <td nowrap valign=""top"" align=""center"">|</td>" & vbNewLine
loop
End Sub RecPerPage is a constant defined at the top of the page, in my case it's 25, CurPage is the current page number, TotalPages is the total number of pages (gotten through the SQL query), ResultsCount is a variable that contains the total number of records to be shown (also gotten through the SQL query). |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 05 February 2003 : 15:02:46
|
  |
 |
|
Nathan
Help Moderator
    
USA
7664 Posts |
|
seahorse
Senior Member
   
USA
1075 Posts |
Posted - 06 February 2003 : 02:41:39
|
quote: Arn't you worried about DVD Rot?
I think that's a secret conspiracy by the move studios to force consumers to repurchase DVDs and continually make them money!  |
Ken =============== Worldwide Partner Group Microsoft |
 |
|
Nathan
Help Moderator
    
USA
7664 Posts |
Posted - 06 February 2003 : 02:46:41
|
Either that or just a bad batch of disk ;)
Not everything is a conspiracy. Well, maybe the fact that msn.com gives IE good code but gives Opera code that doesn't render on either Opera or on IE. . . |
Nathan Bales CoreBoard | Active Users Download |
 |
|
Roland
Advanced Member
    
Netherlands
9335 Posts |
Posted - 06 February 2003 : 18:17:46
|
I changed the paging links again... Using | xx-xx | xx-xx| etc. just made the list too wide on lower resolutions. It also made less sense than showing page numbers, unless I added an explanation for those numbers  |
 |
|
|
Topic  |
|