Reputation: 21989
I have a select element with a few options. Depending on what is selected, I would like to toggle the display for inherited data.
<select>
<option>Option "A"</option>
<option>Option "B"</option>
</select>
<table>
<tr><th>TABLE A SELECT</th></tr>
</table>
<table>
<tr><th>TABLE B SELECT</th></tr>
</table>
option "A" selected - Auto Display TableA
option "B" selected - Auto Display TableB
Upvotes: 0
Views: 94
Reputation: 4079
assign the tables an ID, catch the select's onchange event, in the event get the selected item. If they selected A set the display style of table A to block and table B to none, or vice-verse if they select B...
Upvotes: 1