I have an html table which is dynamically created. The number of rows and coloumns wil be different for each search depending on search results.. This is how im creating a table
for(count = 0 ; count < facetList.length ;){
facetsString+="<div id='test'>";
facetsString+="<table id='facetTable' border='1' width='830px' style='margin-left:30px; margin-top:30px; font-family:Tahoma; '>";
for( var i=0 ; i< 6 && count < facetList.length ; i++ ){
facetsString+="<tr>";
for(var j=0;j<4 && count < facetList.length ; j++){
facetsString+="<td><form><input type='checkbox'></form> "+facetList[count].term+ "(" + facetList[count].count + ")" + "</td>";
count++;
}
facetsString+="</tr>";
}
facetsString+="</table>";
facetsString+="</div>";
}
return facetsString;
};
Now there is checkbox before each entry in the table..I want to display the name of the element whose box is checked…
This is the code that wrked.