A simple way to do this is to put the information you wish to show with the onclick event in a hidden div tag and then just change the visibility property with the onclick event.
Try messing around with the code below.
Code:
<script>
function ClickTest(index)
{
if (index == 1)
{
//Show Div 1
document.all["DIV1"].style.visibility = 'visible'
document.all["DIV1"].style.display = ''
//HIde Div 2
document.all["DIV2"].style.visibility = 'hidden'
document.all["DIV2"].style.display = 'none'
}
else
{
//Hide Div 1
document.all["DIV1"].style.visibility = 'hidden'
document.all["DIV1"].style.display = 'none'
//Show Div 2
document.all["DIV2"].style.visibility = 'visible'
document.all["DIV2"].style.display = ''
}
}
</script>
<table>
<tr>
<td><input onclick="ClickTest(1);" type="radio" name="Test" id="1">Test 1</td>
<td><div style="visibility:Hidden;display:none" Id="DIV1">Put Anything you like in here</div></td>
</tr>
<tr>
<td><input onclick="ClickTest(2);" type="radio" name="Test" id="2">Test 2</td>
<td><div style="visibility:Hidden;display:none" Id="DIV2">Or here</div></td>
</tr>
</table>
The 'display' attribute makes the are not take up space if the divs are stacked vertically.(so there is no space when they are not visible)
======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================