• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ID attribute in tr, td of table

 
auvrm papu
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I understand, ID attribute should be unique.

If I have a loop of <tr> and <td>, is the below mentiond one legal?
or is there a way to loop the idname???

for example,
one1
one2,
one3...etc

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ais Kaly:
As I understand, ID attribute should be unique.

...

is the below mentiond one legal?

I would say that you've answered your own question. If the loop results in more than one instance of the same id, then no.
 
auvrm papu
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Please suggest what is the best way to iterate the IDs' in this case
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is getting JSP-centric so I've moved this to the JSP forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, one way to make each unique is to incorporate the loop index into each iteration. Check out the varStatus attribute of <c:forEach> for info on how to obtain the current iteration index.
[ February 13, 2008: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic