Retrieving the column number clicked?

M

Mick White

<thead>
<tr id="header">
<th><a href="#"
onclick="sortTable('rhinos',this.id,sortNumerical);" id="col0" >#</a></th>
<th><a href="#"
onclick="sortTable('rhinos',this.id,sortByPosition);" id="col1">P</a></th>
<th><a href="#"
onclick="sortTable('rhinos',this.id,sortByLastNames);"
id="col2">NAME</a></th>

.....
</tr>
</thead>
Full code: http://www.mickweb.com/football/aleague/profiles.html

Is it possible to programatically determine which column is clicked? I
am presently parsing the id.

Thanks, Mick.
 
L

Lasse Reichstein Nielsen

Mick White said:
Is it possible to programatically determine which column is clicked?

Table cell objects have a property called "cellIndex", which is the
index of the cell in the row's cell collection (and the column, if
each cell is only one column wide)

/L
 
M

Mick White

Lasse said:
Table cell objects have a property called "cellIndex", which is the
index of the cell in the row's cell collection (and the column, if
each cell is only one column wide)

Thanks Lasse, unfortunately this property always returns "0" in Safari
1.0.2, works in every other browser that I have, though.
Mick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top