Something like:

$("long-table").select("tr").eachSlice(40, function(rows) {

  var table = new Element("table");
  rows.each(function(tr) {
    table.insert(tr);
  });
  $(document.body).insert(table);

});

That would leave you with all of the table rows moved into new tables with
40 rows each (the remainder in the last table).

>From there you can hide all of the tables you just created, and create some
sort of basic next/previous interface that would toggle the table
visibility.

Best,
Alex

On Tue, Feb 9, 2010 at 1:20 PM, albert kao <[email protected]> wrote:

> Instead of displaying one long table with many rows and use the scroll
> bar to look at the data.
> Is it possible to divide the table so that each screen will display at
> most 40 rows?
> The user click the "Next", "Previous" buttons to go to the next or
> previous page.
> or the "1", "2", "3", ... to go to any page directly
> Any sample code available?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<prototype-scriptaculous%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to