This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes calculation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "calculation" Watch "calculation" New topic


Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
I have generating some table for a html page.
I try to print a footer and a header every page.
The html code is generated dynamically by some java code. what's the best way to keep track of the no of row or how much i have printed in order to put a footer there? (counting the number of <tr>? number of <br>?) doesn't sound work.
any suggestion? thanks!
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
the best idea could be to have three tables,
1st table - header
2nd table - data from java code
3rd table - footer
now you don't have to worry about tr,td countings on a whole

Spritle Software Blogs
Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
thanks Balaji,
but i have no idea how long is the data for the content, but i know the header and footer, so what i need to do is counting the number of tr in the content? thanks!
- jack
It is sorta covered in the JavaRanch Style Guide.
subject: calculation
It's not a secret anymore!