• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Table and Javascript

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a response page with data displayed in
HTML table format. The data might have 200+ rows
with 6 columns.

Instead of displaying all the rows at once and
let user scrolls through the data, is it possible
to use javascript variables to store the data and
display 10 rows at a time? Or there is some better
way to handle this type of problem?

TIA,
Nimchi
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the information is being generated on the server side then you can use paging of the information. Show only X amount of the rocirds at a time, theny press a button and calls the server to show the next group of records.

You can pull almost the same thing off by using javascript by hiding rows that you do not want to show.

I perfer the server side method....

Eric
 
Nimchi Yung
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the response is generated on the server and
I am trying to avoid all these round-trip traffic.

Also, it might improve the user experience because
data is there. User has to click up and down button
to scroll up and down.

You can pull almost the same thing off by using javascript by hiding rows that you do not want to show.



I am not a javascript expert. Is there any example/tutorial
to demonstrate this?

Thanks,
Nimchi
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote this just for you so you should feel special!



best thing to copy this code is to hit the quote button. Select the code and the un-espace it using this trust tool of mine: http://www10.brinkster.com/a1ien51/JavaRanch/Escaper.htm

Eric
 
Nimchi Yung
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric:

Thank you so much. I'll look into your provided example.

Thanks,
Nimchi
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic