Goal:
Retrieve data “aaa” from the first “td” in “tr” by pressing the link “info”. For instance, if pressing the link “info” from the first “tr” I should retrieve the data “aaa” from the first “tr”.
Problem:
Having problem to find a solution to retrieve data “aaa” by pressing
the link “info” by using javascript AND jquery. In other word, how to
retrieve data by jquery and javascript
Please rememeber that I also need to transer the value aaa for other method in relation to business logic.
Another thing, The quantity of rows in the list can be changed everyday.
<table border="1" SUMMARY="aaa" id="tblProjekt">
<thead>
<tr>
<th>Projekt name</th>
<th>Total time</th>
<th>Task</th>
<th>comments</th>
</tr>
</thead>
<tbody>
<tr>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td><a href='#' onclick='startPoint(); return false;'>info</a></td>
</tr>
<tr>
<td>bbb</td>
<td>bbb</td>
<td>bbb</td>
<td><a href='#' onclick='startPoint(); return false;'>info</a></td>
</tr>
<tr>
<td>bbb</td>
<td>bbb</td>
<td>bbb</td>
<td><a href='#' onclick='startPoint(); return false;'>info</a></td>
</tr>
</tbody>
</table>
I agree to 3nigma that the question is not clear. In case you wanted the link to appear in each row and display first cell’s content after clicking it, here is the solution (see jsfiddle):
This will display alert popup with what I have just described. It assumes your HTML should look like this:
Did it help? Is it what you needed?
Ps. I removed inline JavaScript from your code. Try to avoid this if possible.