JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2058
Number of posts: 5158

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
scrolling table data Posted by Josh Code on 4 Jan 2003 at 7:00 PM
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?

Report
Re: scrolling table data Posted by dx_myrddraal on 6 Jan 2003 at 11:55 PM
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!!

Report
Re: scrolling table data Posted by Josh Code on 7 Jan 2003 at 12:54 AM
: 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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.