I have a table which contain 100 rows and td. like see below
<table border="0" cellpadding="0" cellspacing="0" id="artcle-title" >
<tr>
<td>Artcle details 1</td>
</tr>
<tr>
<td>Artcle details 2</td>
</tr>
<tr>
<td>Artcle details 3</td>
</tr>
<tr>
<td>Artcle details 4</td>
</tr>
....
</table>
When a user click on a td content, i want to display a separate content table with respect to the selected table.i want to display the content in a separate table. I meant out side the selected table.
My question is that
How i identify which table is selected ( with out passing any argument eg: funshow(td_id1) etc)
Does any one know this?
You could attach a
clickhandler to eachtrelement in thetable. Once clicked this handler will be invoked and you will be able to get the underlying DOM element. Once you have the element you can modify its contents. Depending on whether you are using a javascript framework or not the way to achieve this will vary. For example using jQuery: