This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Finding Table Cell co-ordination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Finding Table Cell co-ordination" Watch "Finding Table Cell co-ordination" New topic
Author

Finding Table Cell co-ordination

Tokai Moshai
Greenhorn

Joined: May 24, 2006
Posts: 16
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

Joined: May 24, 2006
Posts: 16
I found it:

use OnClick with window.event.srcElement.recordNumber
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Finding Table Cell co-ordination
 
Similar Threads
Help me to have a sortable table in my html profile!
complicate JSP tag : bodyContent
Trouble with model for calculating and adding table values dependent on multiple rows
Scroll of div fail to work when table row inside it is higlighted
Architecture Advice Required: to JSP or not ?