www.webdeveloper.com
Results 1 to 5 of 5

Thread: HTML page numbers "x of x"

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    HTML page numbers "x of x"

    Hi,
    I've been searching for the answer for over a day and still can't find the code so I thought I'll ask in forum. So my situation is I have a linear webpage (navigation with only back and next buttons) and I would like to impliment a code which automaticly shows on which page am I and counts how many pages are there total. Could do that manually but I'm very oftenly adding new pages so it takes some time to rewrite it all. So any suggestion?
    Thanks in advance.

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Seems simple enough in PHP or any other server side language. Which one do you have available?
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Mar 2012
    Posts
    3
    At the moment only HTML + CSS Is it even possible?

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by NoName09 View Post
    Is it even possible?
    You could do something with JavaScript but support would be spotty. It wouldn't always work so if this is just for eye candy then you could use JavaScript. But if this is necessary then you'll need some sort of server side scripting.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Mar 2012
    Posts
    1,525
    [QUOTE=NoName09;1198753]
    So my situation is I have a linear webpage (navigation with only back and next buttons) and I would like to impliment a code which automaticly shows on which page am I and counts how many pages are there total.
    /QUOTE]
    Not only is this not possible in HTML/CSS, but it is short-sighted:

    a) Surely you have to amend the links on the affected pages anyway?

    b) How usable will a large site be with only sequential access?

    No one will read past the third page (if that far). So even if you want the reader to read squentially, you will have to provide points where people can leave and return to (people have other demands on their time). Hence you might as well build in "random" access from the start.

    Then if you still want to number the pages, the way to minimise the re-numbering is to split the site into sections. So you only have to re-number a section when you insert a new page, not the rest of the site!

    Postscript: The alternative is to use a site designer package that supports re-numbering. I don't use a site designer package, so I caan't say which have this facility, but I'd guess that it is available. Only you still have the usability problem, so what is the point??? Sequential access does not work on web sites, particularly on dynamic ones subject to change.
    Last edited by jedaisoul; 03-21-2012 at 03:15 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles