Advanced Search

Results 1 to 6 of 6

Thread: Dynamic pagination?

  1. #1
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default Dynamic pagination?

    I'm looking for a dynamic/ajax pagenation script that will work with a database. I'm retrieving image-id numbers and need to show 20 images <img src "image-ID"> per page then have a page numbers at the bottom for going to the next pages. But i also would like for the page not to stay static. refresh the images without the page moving


    this is an example of how my script currently display the images. I stripped out all the extra HTML coding but with the current coding it shows all of the users friends on one page.

    Code:
    <!--[Loop Start QUERY:SELECT * FROM $favstable LEFT JOIN $membtable ON m_id=f_fav LEFT JOIN $picstable ON f_fav=i_user WHERE f_user=$en[m_id] AND i_status=2]-->
    
    <a href='<%dir%>view/<%m_user%>.html'>
    <img src='<%dir%>images/small/<%f_fav%>-<%i_id%>.jpg' border=1></a>
    <a href='<%dir%>view/<%m_user%>.html'>
    <%m_user%></a>
    <!--[Loop End]-->
    its a template script that allows php queries to be inserted very easy.

    thanks in advance

    patrick
    Last edited by acctman; 10-27-2008 at 10:47 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Have you seen this?

  3. #3
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    Have you seen this?
    the problem with that is I don't want to create a page with hundreds of images and text. i would prefer to do it the traditional way

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by acctman View Post
    the problem with that is I don't want to create a page with hundreds of images and text. i would prefer to do it the traditional way
    You don't have to. Use ajax to dynamically display the images/text.

  5. #5
    Join Date
    Jul 2006
    Posts
    64
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    You don't have to. Use ajax to dynamically display the images/text.
    but if there is 200-300 images the load time into a page becomes too much

  6. #6
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by acctman View Post
    but if there is 200-300 images the load time into a page becomes too much
    Then, what exactly are you trying to do? By using AJAX, I mean return the next "page" of 20 images dynamically. When someone clicks "next", query the database for the next 20 images and load them. This actually reduces the load time. You wouldn't be loading all 200 images at once.

Bookmarks

Posting Permissions

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