SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Get next 20 rows from db with span onclick?

    OK. I'm learning. I have a side bar with pseudo links(no a tags)ul li elements that automate httprequests nicely. They call different db tables to a display div on the index page. Right now the tables are small and a javascript function deliniates the last row echoed as 'Last Item' in the HTML div that recieves the responseText. Now if the db table queried has more than 20 rows or the limit I would like the client to be able to click 'Last item' span tag to recieve the next rows in the db table and if there are no more rows in that table act as though the next 'li' or 'ul li' element was clicked. I presume that an array of the 'li' elements called 'products' should be created and that next sibling of that array can make the next httprequest when the 'Last item' span is clicked on. How to test for the limit of rows and ensure the correct response in that array is the problem.
    Any advice or direction greatly appreciated! This maybe an Ajax or Dhtml question?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Heinz Stapff View Post
    This maybe an Ajax or Dhtml question?
    yes it is
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •