I have three tables in my HTML form. Each table has different number of rows and upon double click of any row its value should be passed to a javascript function. These passed values should get appended to a text box present in the same form.
I have given Ids to all three tables and am passing this tableId to the function. Also, how to retrieve the value selected from the table into this javascript function.
What I have done so far is below. A small snippet of one table and the function. Am a newbie to HTML, so hoping for a few helpful answers. :)
<table id="functionTable" >
<tr>
<td class="groupObjectTitle" nowrap>Functions</td>
</tr>
<td>
<div class="easyui-panel">
<li>
<span>Mathematical</span>
<ul id="mathFunctions">
<li> <a href="javascript:" ondblclick="transferText('functionTable')"> + </a></li>
........
function transferText(table){
var i;
var k;
var tabs= document.getElementById(table);
alert("transferText called on double click");
for (i=0;i<tabs.rows.length;i++){
alert(tabs.rows[i].selected);
<!-- How to retrieve the value from the selected row. -->
}
}