0

is it possible to have a clickable table wherein once you click that specific row, a dialog box will appear to display the entire row. could you help me with this one..thanks in advnce ^^

4
Contributors
8
Replies
10
Views
7 Years
Discussion Span
Last Post by xuexue
0

It would require javascript but as for the basics I believe it would be something like the following.

<table>
<tr onclick=javascript:showrow(1)><td></td><td id="1"></td></tr>
<tr onclick=javascript:showrow(2)><td></td><td id="2"></td></tr>

Then you would use css to hide the rows and a custom javascript function to show the rows. Hope that helps.

0

sorry i forgot to wrap it in bb codes

<table>
<tr onclick='alert(document.getElementById("row1").innerHTML)'><td id='row1'>your_content_here</td></tr>
</table>
0

guys, i really appreciated all your help. it was great. now, is it possible if i want to get the value of that specific row??

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.