This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes God I hope someone has a solution... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "God I hope someone has a solution..." Watch "God I hope someone has a solution..." New topic
Author

God I hope someone has a solution...

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
I have this perl app... don't worry this isn't a Perl question. There will essentially be 3 parts to the page this app uses. Right now when entering the app the user sees a bunch of textfields and dropdowns used to get selection criteria from the user. When everything is entered the app gets executed and comes back to the same page. Underneath the criteria section (i.e. entry fields) a header row appears with each column name in it and directly underneath (in the same table) is the corresponding data. What I want to do is have the criteria show at the top of the page when no report had been executed and every time the user executes a report after just entering have the header appear at the top of the page and the content underneath. The only problem with all this (since merely moving these components around is a snap in Perl) is that I need the header to always stay above the content when scrolling through the data. I was going to use 3 frames (clumsy I know) but the criteria section and the header will be different sizes first off. So making a frame large enough for the criteria first in would be fine but then the header on subsequent executes would have too much wasted space surrounding it. Anyone have any suggestions? Thanks.

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do a search for scrollable Table on the forum....

I think that is what you are looking for....
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Thanks a lot Eric!!! Great example! Just one thing though. I want to mimic something like Excel whereby Freeze Panes can be used. Ideally I would like to have a table header that does not scroll with the data table. Is there a way of doing this? Right now the header columns and the data columns aren't aligning properly. I'm using percentages in the tables because of the nature of the report. Thanks again for the help!

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The percentages are what is a pain with my 2 line scroll table. I was working on a fix last month, but I have not been able to do any personal coding! My job has been frying my brain.

Eric
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Thanks Eric. Just wondering... since I do not need to worry about the columns on first opening the application is there a way to grab the maximum width of the display area of the browser through javascript? If so, I could use that value and apply my percentages to the overall total of the display area, then use absolute values instead for the column widths. Anything you know of along these lines that might help? Appreciate the help.

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
That is what I was working on, but then you also have to worry about the browser resizing.

Eric
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
If using IDs with the columns could I, on a window resize and on loading, see what the column widths are in the "header" table and then set the column widths accordingly for the data columns? I wish there was a freeze pane property for this.

Rob
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: God I hope someone has a solution...