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 Number of Table Rows Returning Double Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Number of Table Rows Returning Double" Watch "Number of Table Rows Returning Double" New topic
Author

Number of Table Rows Returning Double

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
Any idea why the following would return 22 on a table that only has 11 rows?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56179
    
  13

I asked for your table markup to drop from the sky, but it didn't happen.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Bad markup?

You loop through and see why?

Eric
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
Bear Bibeault wrote:I asked for your table markup to drop from the sky, but it didn't happen.


Here is the JSP of the table:

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
JSP code never helps - I believe we told you this many times before.

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Quick glance, I am guessing it is counting the rows that are in the child tables, but I would not know by seeing what the real html looks like.

Also when you mark up tables, you should use thead and tbody tags.

Eric
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
Eric Pascarello wrote:Quick glance, I am guessing it is counting the rows that are in the child tables, but I would not know by seeing what the real html looks like.

Also when you mark up tables, you should use thead and tbody tags.

Eric


Here is source from a tble that should only have three rows but says it has 5:

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
When I look in Firebug, I see 5 rows

Eric
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
Eric Pascarello wrote:When I look in Firebug, I see 5 rows

Eric


thanks.

I took out the table within the table and it gives me the desired results.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Number of Table Rows Returning Double
 
Similar Threads
Struts2: client side repeated validation error messages
How to read data from an HTML table
how to retrieve a particular value from datatable
Dynamically increasing DIV size
can't get indexed form property to work.