Scroll a table by multiple rows at a time?

Discussion in 'HTML' started by Martin, Sep 6, 2012.

  1. Martin

    Martin Guest

    I have a table with several hundred rows of data in it. The actual
    number of rows will always be a multiple of 16. The table would be
    sized to display 16 rows and I would like for the user to be able to
    scroll the table 16 rows at a time.

    I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    next to the table that the user could click on.

    Any thoughts on how I might do this?
    Martin, Sep 6, 2012
    #1
    1. Advertising

  2. Martin

    TK Guest

    On 9/6/2012 6:44 AM, Martin wrote:
    > I have a table with several hundred rows of data in it. The actual
    > number of rows will always be a multiple of 16. The table would be
    > sized to display 16 rows and I would like for the user to be able to
    > scroll the table 16 rows at a time.
    >
    > I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    > next to the table that the user could click on.
    >
    > Any thoughts on how I might do this?
    >

    I am not following you. There is a scroll bar on the browser window
    that will accomplish what I think you are saying. Please clarify.

    --
    TK ~ aka Terry Kimpling
    http://wejuggle2.com/
    The 3 ages of man are, youth, adult, and "gee, you look good!" - Red Skelton
    TK, Sep 6, 2012
    #2
    1. Advertising

  3. Martin

    Martin Guest

    On Thu, 06 Sep 2012 06:58:25 -0500, TK <> wrote:

    >On 9/6/2012 6:44 AM, Martin wrote:
    >> I have a table with several hundred rows of data in it. The actual
    >> number of rows will always be a multiple of 16. The table would be
    >> sized to display 16 rows and I would like for the user to be able to
    >> scroll the table 16 rows at a time.
    >>
    >> I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    >> next to the table that the user could click on.
    >>
    >> Any thoughts on how I might do this?
    >>

    >I am not following you. There is a scroll bar on the browser window
    >that will accomplish what I think you are saying. Please clarify.


    Yes, there is normally a scroll bar that "slides" the table rows up &
    down however much the user wants - I plan to hide that. What I want to
    do is "snap" the table rows up or down 16 rows at a time. The effect
    would be that the user would be "paging" through the list 16 rows at a
    time.
    Martin, Sep 6, 2012
    #3
  4. Martin wrote:

    > On Thu, 06 Sep 2012 06:58:25 -0500, TK <> wrote:
    >
    >>On 9/6/2012 6:44 AM, Martin wrote:
    >>> I have a table with several hundred rows of data in it. The actual
    >>> number of rows will always be a multiple of 16. The table would be
    >>> sized to display 16 rows and I would like for the user to be able to
    >>> scroll the table 16 rows at a time.
    >>>
    >>> I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    >>> next to the table that the user could click on.
    >>>
    >>> Any thoughts on how I might do this?
    >>>

    >>I am not following you. There is a scroll bar on the browser window
    >>that will accomplish what I think you are saying. Please clarify.

    >
    > Yes, there is normally a scroll bar that "slides" the table rows up &
    > down however much the user wants - I plan to hide that.


    You can't hide the browser scroll bar. That belongs to me, not you, and is
    not a part of your web page.

    > What I want to
    > do is "snap" the table rows up or down 16 rows at a time. The effect
    > would be that the user would be "paging" through the list 16 rows at a
    > time.


    You probably want something like this:

    <http://www.imaputz.com/cssStuff/bigFourVersion.html>
    <http://imar.spaanjaars.com/357/a-scrollable-table-with-a-fixed-header>

    Make it so that your 16 rows fits the height of the table. (You could also
    add a fixed footer to the table.)

    --
    -bts
    -This space for rent, but the price is high
    Beauregard T. Shagnasty, Sep 6, 2012
    #4
  5. Martin

    Neil Gould Guest

    Martin wrote:
    > I have a table with several hundred rows of data in it. The actual
    > number of rows will always be a multiple of 16. The table would be
    > sized to display 16 rows and I would like for the user to be able to
    > scroll the table 16 rows at a time.
    >
    > I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    > next to the table that the user could click on.
    >
    > Any thoughts on how I might do this?
    >

    One sure way to do this is to populate the table from a database via
    server-side scripting. The table would only have 16 rows, and your "up and
    down" buttons would load the previous or next set of data. This approach
    would also be tolerant of folks resizing their viewport if the height of the
    table set at 100%.

    --
    best regards,

    Neil
    Neil Gould, Sep 6, 2012
    #5
  6. Martin

    richard Guest

    On Thu, 6 Sep 2012 09:44:06 -0400, Neil Gould wrote:

    > Martin wrote:
    >> I have a table with several hundred rows of data in it. The actual
    >> number of rows will always be a multiple of 16. The table would be
    >> sized to display 16 rows and I would like for the user to be able to
    >> scroll the table 16 rows at a time.
    >>
    >> I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    >> next to the table that the user could click on.
    >>
    >> Any thoughts on how I might do this?
    >>

    > One sure way to do this is to populate the table from a database via
    > server-side scripting. The table would only have 16 rows, and your "up and
    > down" buttons would load the previous or next set of data. This approach
    > would also be tolerant of folks resizing their viewport if the height of the
    > table set at 100%.


    And the constant refreshing of the page just to scroll a few lines would
    drive away the customers.

    A better way might be to display a set of rows at a time.
    Using a bit of javascript to show/hide each sub table.
    That way, the full table is already on the page and the page does not need
    to be refreshed.
    richard, Sep 14, 2012
    #6
  7. Martin

    Neil Gould Guest

    richard wrote:
    > On Thu, 6 Sep 2012 09:44:06 -0400, Neil Gould wrote:
    >
    >> Martin wrote:
    >>> I have a table with several hundred rows of data in it. The actual
    >>> number of rows will always be a multiple of 16. The table would be
    >>> sized to display 16 rows and I would like for the user to be able to
    >>> scroll the table 16 rows at a time.
    >>>
    >>> I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    >>> next to the table that the user could click on.
    >>>
    >>> Any thoughts on how I might do this?
    >>>

    >> One sure way to do this is to populate the table from a database via
    >> server-side scripting. The table would only have 16 rows, and your
    >> "up and down" buttons would load the previous or next set of data.
    >> This approach would also be tolerant of folks resizing their
    >> viewport if the height of the table set at 100%.

    >
    > And the constant refreshing of the page just to scroll a few lines
    > would drive away the customers.
    >

    Not if it's done properly. The only thing that would change in most browsers
    would be the data in the table, and the rest of the page would appear to be
    static. BTDT many times.

    > A better way might be to display a set of rows at a time.
    > Using a bit of javascript to show/hide each sub table.
    > That way, the full table is already on the page and the page does not
    > need to be refreshed.
    >

    And, customers with JavaScript disabled would be staring at a blank, or
    worse. That's a "better way"???

    --
    best regards,

    Neil
    Neil Gould, Sep 14, 2012
    #7
  8. On Thu, 06 Sep 2012 04:44:14 -0700, Martin <>
    wrote:

    >I have a table with several hundred rows of data in it. The actual
    >number of rows will always be a multiple of 16. The table would be
    >sized to display 16 rows and I would like for the user to be able to
    >scroll the table 16 rows at a time.
    >
    >I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    >next to the table that the user could click on.
    >
    >Any thoughts on how I might do this?


    Please do not do this.

    My browser has scrollbars so that I can scroll through a page. It
    also has Find so I can look for content on the page. If you only
    present a smidgin of the data, it makes searching labourious.

    Here is an example of how this affects the user.

    I follow Patricia Wrede's blog -- she is a fantasy author -- and
    in one article, she pointed to another blog. She did not point to a
    specific blog entry, just the blog. Unfortunately, that blog displays
    five entries at a time and has bad navigation. I did not see any way
    to skip to a different page (except the previous). I was going to
    have to scroll back through several months of entries to find the one
    I wanted.

    I ended up giving up on it.

    That is probably not the result that you want.

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Sep 14, 2012
    #8
  9. Martin

    Lewis Guest

    In message <k301vt$u5t$>
    Neil Gould <> wrote:
    > richard wrote:
    >> On Thu, 6 Sep 2012 09:44:06 -0400, Neil Gould wrote:
    >>
    >>> Martin wrote:
    >>>> I have a table with several hundred rows of data in it. The actual
    >>>> number of rows will always be a multiple of 16. The table would be
    >>>> sized to display 16 rows and I would like for the user to be able to
    >>>> scroll the table 16 rows at a time.
    >>>>
    >>>> I'm thinking maybe to have "scroll up" and a "scroll down" buttons
    >>>> next to the table that the user could click on.
    >>>>
    >>>> Any thoughts on how I might do this?
    >>>>
    >>> One sure way to do this is to populate the table from a database via
    >>> server-side scripting. The table would only have 16 rows, and your
    >>> "up and down" buttons would load the previous or next set of data.
    >>> This approach would also be tolerant of folks resizing their
    >>> viewport if the height of the table set at 100%.

    >>
    >> And the constant refreshing of the page just to scroll a few lines
    >> would drive away the customers.
    >>

    > Not if it's done properly. The only thing that would change in most browsers
    > would be the data in the table, and the rest of the page would appear to be
    > static. BTDT many times.


    >> A better way might be to display a set of rows at a time.
    >> Using a bit of javascript to show/hide each sub table.
    >> That way, the full table is already on the page and the page does not
    >> need to be refreshed.
    >>

    > And, customers with JavaScript disabled would be staring at a blank, or
    > worse. That's a "better way"???


    What percentage of users have JAvascript disabled? The web simply does
    not work without it.

    --
    "I am enclosing two tickets to the first night of my new play; bring a
    friend.... if you have one." - GB Shaw to Churchill "Cannot possibly
    attend first night, will attend second... if there is one." - Winston
    Churchill, in response.
    Lewis, Sep 15, 2012
    #9
  10. Martin

    Neil Gould Guest

    Lewis wrote:
    > Neil Gould <> wrote:
    >> richard wrote:
    >>> A better way might be to display a set of rows at a time.
    >>> Using a bit of javascript to show/hide each sub table.
    >>> That way, the full table is already on the page and the page does
    >>> not need to be refreshed.
    >>>

    >> And, customers with JavaScript disabled would be staring at a blank,
    >> or worse. That's a "better way"???

    >
    > What percentage of users have JAvascript disabled? The web simply does
    > not work without it.
    >

    You'd be surprised, apparently. A good website design does not require that
    which can't be assured, especially when the information is important to the
    customer.

    --
    best regards,

    Neil
    Neil Gould, Sep 15, 2012
    #10
  11. Martin

    Lewis Guest

    In message <k31ps4$gm2$>
    Neil Gould <> wrote:
    > Lewis wrote:
    >> Neil Gould <> wrote:
    >>> richard wrote:
    >>>> A better way might be to display a set of rows at a time.
    >>>> Using a bit of javascript to show/hide each sub table.
    >>>> That way, the full table is already on the page and the page does
    >>>> not need to be refreshed.
    >>>>
    >>> And, customers with JavaScript disabled would be staring at a blank,
    >>> or worse. That's a "better way"???

    >>
    >> What percentage of users have JAvascript disabled? The web simply does
    >> not work without it.
    >>

    > You'd be surprised, apparently. A good website design does not require that
    > which can't be assured, especially when the information is important to the
    > customer.


    I would be surprised. Last year I tried an experiment of disabling
    Javascript for a day. I could do almost nothing on the Internet. Very
    few sites worked well, and most didn't work at all.

    --
    Charlie don't surf!
    Lewis, Sep 15, 2012
    #11
  12. On Sat, 15 Sep 2012 06:13:12 +0000 (UTC), Lewis
    <> wrote:

    [snip]

    >What percentage of users have JAvascript disabled? The web simply does
    >not work without it.


    It sure does. I tend to skip sites requiring JavaScript. I use
    NoScript and have only about 30 sites in my permanent list of sites
    allowed to execute JavaScript. I do temporarily allow some sites to
    execute JavaScript.

    There are over 1,000 sites on the Web to choose from so I do not
    feel that I am missing much.

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Sep 17, 2012
    #12
  13. On Sat, 15 Sep 2012 20:10:14 +0000 (UTC), Lewis
    <> wrote:

    [snip]

    >I would be surprised. Last year I tried an experiment of disabling
    >Javascript for a day. I could do almost nothing on the Internet. Very
    >few sites worked well, and most didn't work at all.


    I have seen many sites that do not allow navigating links without
    having JavaScript enabled. (What is wrong with using <a>?) When that
    sort of silliness happens, I try a different site. There are a lot of
    them to try.

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Sep 17, 2012
    #13
  14. Martin

    Lewis Guest

    In message <>
    Gene Wirchenko <> wrote:
    > On Sat, 15 Sep 2012 06:13:12 +0000 (UTC), Lewis
    > <> wrote:


    > [snip]


    >>What percentage of users have JAvascript disabled? The web simply does
    >>not work without it.


    > It sure does. I tend to skip sites requiring JavaScript. I use
    > NoScript and have only about 30 sites in my permanent list of sites
    > allowed to execute JavaScript.


    So, those 30 sites that you allow, do they work without javascript?

    Because if not, you really just proved my point for me.

    >I do temporarily allow some sites to execute JavaScript.


    And again.


    --
    A: You can never go too far. B: If I'm gonna get busted, it is *not*
    gonna be by a guy like *that*.
    Lewis, Sep 17, 2012
    #14
  15. On Mon, 17 Sep 2012 14:00:16 +0000 (UTC), Lewis
    <> wrote:

    >In message <>
    > Gene Wirchenko <> wrote:
    >> On Sat, 15 Sep 2012 06:13:12 +0000 (UTC), Lewis
    >> <> wrote:

    >
    >> [snip]

    >
    >>>What percentage of users have JAvascript disabled? The web simply does
    >>>not work without it.

    >
    >> It sure does. I tend to skip sites requiring JavaScript. I use
    >> NoScript and have only about 30 sites in my permanent list of sites
    >> allowed to execute JavaScript.

    >
    >So, those 30 sites that you allow, do they work without javascript?
    >
    >Because if not, you really just proved my point for me.
    >
    >>I do temporarily allow some sites to execute JavaScript.

    >
    >And again.


    Pardon me? I believe that your claim was that the Web does not
    work without JavaScript. If a small percentage of the Websites that I
    use require JavaScript, that does not mean that the whole Web does.

    Those 30 (plus the temps which I do not count) Websites are the
    ones that need JavaScript AND are of use to me. I access far more
    Websites that do not need JavaScript.

    There are many, many Websites that do not require JavaScript.

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Sep 17, 2012
    #15
  16. Martin

    Neil Gould Guest

    Lewis wrote:
    > In message <k31ps4$gm2$>
    > Neil Gould <> wrote:
    >> Lewis wrote:
    >>> Neil Gould <> wrote:
    >>>> richard wrote:
    >>>>> A better way might be to display a set of rows at a time.
    >>>>> Using a bit of javascript to show/hide each sub table.
    >>>>> That way, the full table is already on the page and the page does
    >>>>> not need to be refreshed.
    >>>>>
    >>>> And, customers with JavaScript disabled would be staring at a
    >>>> blank, or worse. That's a "better way"???
    >>>
    >>> What percentage of users have JAvascript disabled? The web simply
    >>> does not work without it.
    >>>

    >> You'd be surprised, apparently. A good website design does not
    >> require that which can't be assured, especially when the information
    >> is important to the customer.

    >
    > I would be surprised. Last year I tried an experiment of disabling
    > Javascript for a day. I could do almost nothing on the Internet. Very
    > few sites worked well, and most didn't work at all.
    >

    I have the opposite experience. Perhaps because I personally use the quality
    of a site's design as a filter to eliminate vendors and so forth. Poor
    designs suggest that my time would be better spent at one of their
    competitor's sites, and requiring Javascript for basic browsing is a
    sure-fire indicator of a bad design. Saves me a lot of time, and improves
    the quality of my browsing experience.

    --
    best regards,

    Neil
    Neil Gould, Sep 17, 2012
    #16
  17. Martin

    Lewis Guest

    In message <>
    Gene Wirchenko <> wrote:
    > On Mon, 17 Sep 2012 14:00:16 +0000 (UTC), Lewis
    > <> wrote:


    >>In message <>
    >> Gene Wirchenko <> wrote:
    >>> On Sat, 15 Sep 2012 06:13:12 +0000 (UTC), Lewis
    >>> <> wrote:

    >>
    >>> [snip]

    >>
    >>>>What percentage of users have JAvascript disabled? The web simply does
    >>>>not work without it.

    >>
    >>> It sure does. I tend to skip sites requiring JavaScript. I use
    >>> NoScript and have only about 30 sites in my permanent list of sites
    >>> allowed to execute JavaScript.

    >>
    >>So, those 30 sites that you allow, do they work without javascript?
    >>
    >>Because if not, you really just proved my point for me.
    >>
    >>>I do temporarily allow some sites to execute JavaScript.

    >>
    >>And again.


    > Pardon me? I believe that your claim was that the Web does not
    > work without JavaScript. If a small percentage of the Websites that I
    > use require JavaScript, that does not mean that the whole Web does.


    You are not part of the percentage of users that have Javascript
    enabled, since you have found at least 30 sites that you want to use
    that require it.

    Which was the originla question, "What percentage of users have
    Javascript disabled?"

    --
    Secondly, the Earth's a Libra
    Lewis, Sep 17, 2012
    #17
  18. Martin

    Lewis Guest

    In message <>
    Lewis <> wrote:
    > In message <>
    > Gene Wirchenko <> wrote:
    >> On Mon, 17 Sep 2012 14:00:16 +0000 (UTC), Lewis
    >> <> wrote:


    >>>In message <>
    >>> Gene Wirchenko <> wrote:
    >>>> On Sat, 15 Sep 2012 06:13:12 +0000 (UTC), Lewis
    >>>> <> wrote:
    >>>
    >>>> [snip]
    >>>
    >>>>>What percentage of users have JAvascript disabled? The web simply does
    >>>>>not work without it.
    >>>
    >>>> It sure does. I tend to skip sites requiring JavaScript. I use
    >>>> NoScript and have only about 30 sites in my permanent list of sites
    >>>> allowed to execute JavaScript.
    >>>
    >>>So, those 30 sites that you allow, do they work without javascript?
    >>>
    >>>Because if not, you really just proved my point for me.
    >>>
    >>>>I do temporarily allow some sites to execute JavaScript.
    >>>
    >>>And again.


    >> Pardon me? I believe that your claim was that the Web does not
    >> work without JavaScript. If a small percentage of the Websites that I
    >> use require JavaScript, that does not mean that the whole Web does.


    > You are not part of the percentage of users that have Javascript
    > enabled,


    Disabled.

    > since you have found at least 30 sites that you want to use
    > that require it.


    > Which was the originla question, "What percentage of users have
    > Javascript disabled?"




    --
    Friends help you move. Real friends help you move bodies.
    Lewis, Sep 17, 2012
    #18
  19. Martin

    dorayme Guest

    In article <k37tpq$ma8$>,
    "Neil Gould" <> wrote:

    > I personally use the quality
    > of a site's design as a filter to eliminate vendors and so forth. Poor
    > designs suggest that my time would be better spent at one of their
    > competitor's sites, and requiring Javascript for basic browsing is a
    > sure-fire indicator of a bad design. Saves me a lot of time, and improves
    > the quality of my browsing experience.


    I once heard a cow in a field discussing the quality of the grasses.
    One said to the other, "Me, I'm not so fussy to be going only for the
    best grasses in a field, there's no time. I have to eat, there are
    calves to be fed, bulls to be avoided or enjoyed. Near enough is good
    enough. Yes, sometimes I just hold my nose and swallow."

    --
    dorayme
    dorayme, Sep 17, 2012
    #19
  20. Martin

    Neil Gould Guest

    dorayme wrote:
    > In article <k37tpq$ma8$>,
    > "Neil Gould" <> wrote:
    >
    >> I personally use the quality
    >> of a site's design as a filter to eliminate vendors and so forth.
    >> Poor designs suggest that my time would be better spent at one of
    >> their competitor's sites, and requiring Javascript for basic
    >> browsing is a sure-fire indicator of a bad design. Saves me a lot of
    >> time, and improves the quality of my browsing experience.

    >
    > I once heard a cow in a field discussing the quality of the grasses.
    > One said to the other, "Me, I'm not so fussy to be going only for the
    > best grasses in a field, there's no time. I have to eat, there are
    > calves to be fed, bulls to be avoided or enjoyed. Near enough is good
    > enough. Yes, sometimes I just hold my nose and swallow."
    >

    Loved your analogy, and couldn't agree more!

    --
    best regards,

    Neil
    Neil Gould, Sep 18, 2012
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nicholas
    Replies:
    0
    Views:
    431
    nicholas
    Dec 7, 2004
  2. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,201
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  3. Rio
    Replies:
    4
    Views:
    1,174
  4. PT
    Replies:
    1
    Views:
    381
    Ken Schaefer
    Oct 7, 2004
  5. leiño

    add table rows dynamically and scroll

    leiño, Oct 30, 2006, in forum: Javascript
    Replies:
    7
    Views:
    164
Loading...

Share This Page