scrolling table data - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

scrolling table data

Josh CodeJosh Code Posts: 675Member
I have a database in a program and I want it to create an html page to display the information. The problem is the database has over 1000 records so one huge table is too huge.

I want to use a fairly small table that would fit in the window and display roughly 30 records. I want a way to scroll through the data.

I created a table to use for scrolling. Each mousemovement over the each TD, caused the data table to be updated. I updated the data table by clearing the document and rewriting the page with JavaScript. That only updated twice before messing up. I also tried putting all the JavaScript in an external file but that didn't work, either.

Does anyone have any ideas how to make a scrollable table with JavaScript?

Comments

  • dx_myrddraaldx_myrddraal Posts: 22Member
    firstly, i don't really know ehat ur trying 2 do...but in order to male a scrolling 'list':
    1. create a table with 2 buttons somewhere to scrool up or down.
    2. to scroll, update the contents of the table by:
    i) check the last index (30 if thre's 30 rows (1-30))
    ii) calculate the next rows: eg. 2-31
    iii) update the table contents using a loop counter to change the
    child nodes...
    DONE!!
    the child nodes thing is a little troublesome but it's worth it.
    also remember to make sure that the text lengths are not too long (longer that the cell width) or there's bound to be TROUBLE!!!

    post another message if u don't know bout nodes!!

  • Josh CodeJosh Code Posts: 675Member
    : firstly, i don't really know ehat ur trying 2 do...but in order to male a scrolling 'list':
    : 1. create a table with 2 buttons somewhere to scrool up or down.
    : 2. to scroll, update the contents of the table by:
    : i) check the last index (30 if thre's 30 rows (1-30))
    : ii) calculate the next rows: eg. 2-31
    : iii) update the table contents using a loop counter to change the
    : child nodes...
    : DONE!!
    : the child nodes thing is a little troublesome but it's worth it.
    : also remember to make sure that the text lengths are not too long (longer that the cell width) or there's bound to be TROUBLE!!!
    :
    : post another message if u don't know bout nodes!!
    :

    I know about nodes in linked lists and about Borg communication nodes ;-) but I don't know about them in tables:-(.

    I have a temperary solution. I created several different pages to display different sections(smaller tables) of the table in a frame. Scrolling one table would be much better.

    My main problem is not knowing how to update the contents of the table. I thought about using a bunch of textboxes to hold text for each record of data and using JavaScipt to update that property when the table is scrolled.
Sign In or Register to comment.