File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Need Testers - Scrollable Table with Static Header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Need Testers - Scrollable Table with Static Header" Watch "Need Testers - Scrollable Table with Static Header" New topic
Author

Need Testers - Scrollable Table with Static Header

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Many ranchers ask for this script, so I normally give them links to scripts that require a lot of work. Most people do not have the HTML and JavaScript knowledge to do it efficiently so I came up with this.

The Table Script

This one is a three step process: Download - Add js reference - function call!

I was hoping that you can test my example page and maybe run some test of your own on different tables. I want to find the errors. There is about 6 hours of work in this since IE and Mozilla would not agree!

I am working on this to integrate with ASP.NET's datagrids because we have picklists that have a bunch of columns and over 100+ rows. People can not remember what the columns are by the time they get to the bottom!

Thanks A Bunch!
Eric
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I get 404 when trying to get the script.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
With Firefox 1.0 the example table is full size, that is, got no scroll bars.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I am having no problems with the link, hmmm. I am wondering if brinkster is blocking the content, would not surprise me!

Firefox works fine on my C drive and my localhost, I still can not figure out why it dies on brinkster.

hmmm

Eric
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

I get very different results in IE 6.0.28 and Opera 7.53:

table in Opera:

table in IE:
[ December 16, 2004: Message edited by: Jessica Sant ]

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
hmmmm...opera is off since the table borders are not there

no idea why IE is having problems...

This is not fun!

LOL

Eric
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Firefox/Linux looks like Jessica's Opera version and I did not have any problems accessing it online.

Netscape 7/WinXP looks like IE6/WinXP
[ December 16, 2004: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'm getting



with



Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I really need to go test it with my browser at home with sp2

Thanks so far!

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I updated the page a bit, but there were no major changes to the code.

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Okay - I just got it tested with the following:

XP SP2
-IE6 - Good
-Mozilla - Good
-AOL - Good

Win 2K
-IE6 - Good
-Mozilla - Good
-FireFox - Good

Seems to be good on my part...LOL

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Here is one with 2: 2 Tables

Eric
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Using Win 98, FireFox 1.0 - Looks good to me. I could scroll both tables.
The only difference I could find is that in Working Example 1, the 'Test' header was centered and in the Example 2, it was left justified. Not sure if your JS had to do anything with this or not. (I am guessing this has to do with the 'th' and 'td' tags and not your JS). The other difference between the two Examples was that the height of Example 2 was less than that of Example 1.

Hope this helps.

- m
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Both the 1 table demo and 2 table demo are now working corectly with Firefox 1.0 on XP SP2
(Minor problem:the vertical column separator lines in the header and data portion of the table were accumulating line-up errors so there was about a 0.7mm difference on the RHS)


With Internet Exterminator (XP, latest SP2) I get 404 for all the links to demo tables.
[ December 16, 2004: Message edited by: Barry Gaunt ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Originally posted by Madhav Lakkapragada:
Using Win 98, FireFox 1.0 - Looks good to me. I could scroll both tables.
The only difference I could find is that in Working Example 1, the 'Test' header was centered and in the Example 2, it was left justified. Not sure if your JS had to do anything with this or not. (I am guessing this has to do with the 'th' and 'td' tags and not your JS). The other difference between the two Examples was that the height of Example 2 was less than that of Example 1.

Hope this helps.

- m


The td tag centers the text auto.
And I have the height set smaller on the second one.

Eric
chen jiawei
Greenhorn

Joined: Dec 20, 2004
Posts: 1
i just wang to study.thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need Testers - Scrollable Table with Static Header