Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Sample Javascript DOM code for Pagination

    HI

    I have an issue with Pagination in Javascript DOM.
    What i have done is Page numbers are continuously printed based on total number of pages.

    But i want to split out the Pages like "< 1 2 3 4 >", now i have code for "1 2 3 4 5 6 7 8 9 10".

    Please anyone help me to fix this issue.

    What i need is,

    total no pages =10
    page limit =3

    these are output from javascript

    i want display like this, when page loading shows, "1 2 3"

    if total no pages more than page limit so "1 2 3 >"

    when i click on > symbol we want to show "< 4 5 6 >" like that.

    Need snippets to achieve this.

    Regards
    Selva

  • #2
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    All are my own coding. nothing was get from websites.

  • #3
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    1. Google is your friend ... look it up.
    2. This is the PHP forum not the Javascript forum
    3. This is the PHP snippets section not the PHP question section
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • Users who have thanked DJCMBear for this post:

    Arcticwarrio (06-19-2012)


  •  

    Tags for this Thread

    Posting Permissions

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