File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replace text in the <TD> ?

 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All ,


I have 2 <TD> with same ID , so I want to change the text in the second TD .

I tried innerHTML but it was replacing first TD's text .

I want to get second TD and change it's text .

Please suggest if anyone has faced such a issue....


Thanks in advance....


- Chetan
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having two of the same id values in one page is invalid. Fix that problem.
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah completely agreed Bear , But i am working on one product which internally create this type of the structure and is applicable to every screen and every Table TD in it .

But yes i resolved i have one extra hidden field in second TD so i found Parent of that field and then set InnerHTML .


Thanks.....
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic