Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 You're on page N of X
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 05 February 2003 :  05:17:17  Show Profile
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  Show Profile
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
Go to Top of Page

seven
Senior Member

USA
1037 Posts

Posted - 05 February 2003 :  08:12:44  Show Profile  Visit seven's Homepage
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

Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 05 February 2003 :  08:39:32  Show Profile
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
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 05 February 2003 :  09:16:12  Show Profile
<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
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 05 February 2003 :  09:30:21  Show Profile
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.
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 05 February 2003 :  11:10:30  Show Profile
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).
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 05 February 2003 :  15:02:46  Show Profile
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 05 February 2003 :  23:35:14  Show Profile  Visit Nathan's Homepage
Wow, thats quite a collection.

Arn't you worried about DVD Rot?

Nathan Bales
CoreBoard | Active Users Download
Go to Top of Page

seahorse
Senior Member

USA
1075 Posts

Posted - 06 February 2003 :  02:41:39  Show Profile  Visit seahorse's Homepage
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
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 06 February 2003 :  02:46:41  Show Profile  Visit Nathan's Homepage
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
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 06 February 2003 :  18:17:46  Show Profile
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07