Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding Table Cell co-ordination

 
Tokai Moshai
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say I have a table with 3 rows and 3 columns (to keep it simple, in real case it is going to be dynamic). Each of the cell has a hyperlink that calls a function. What need to know is, is there any way to know which cell was clicked using some javascript function?

If I'm not clear,

say I have

<td><a href="javascript:myFunc()"</a></td>

what I need is something like
<td><a href="javascript:myFunc(TableXcoord,TableYcoord)"</a></td>

I'm not able to put those TableXcoord, TableYcoord values when creating the table. so, is there anything like rows[mouse_click].cells[mouse_click]?

Or is there any other way I can solve this problem? I'm not able to put the row values the table that is being created by a class that creates all the cells of the column at the same time. I can put the column values.

Please let me know if I'm still not clear.
 
Tokai Moshai
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found it:

use OnClick with window.event.srcElement.recordNumber
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic