This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Number of Table Rows Returning Double

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea why the following would return 22 on a table that only has 11 rows?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked for your table markup to drop from the sky, but it didn't happen.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bad markup?

You loop through and see why?

Eric
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP code never helps - I believe we told you this many times before.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I look in Firebug, I see 5 rows

Eric
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic