Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What Row am I on?

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I use JSPL to fill in a table and I give each row a unique id. If I click in a cell is there a way to tell what the row id is?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Easiest solution is to add onclick handler to the cell.

<td id="foo" onclick="alert(this.id)">

Eric
[ September 27, 2007: Message edited by: Eric Pascarello ]
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My idea is to have a checkbox in the first column. If it is clicked I want to turn that row yellow. If unchecked turn it back to white. Can you help me with this.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are lucky I am waiting on a build:



Eric
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. Due lack of knowledge I was trying to complicate it too much.
I hope you have time for one more issue. I need the contents of each cell on the row when I click the checkbox. Can this be done?
 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, I figured it out. Again I was using to much code to try an qualify the cell.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just for kicks


Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic