Click to See Complete Forum and Search --> : dynamic display


mandavae
08-21-2003, 09:14 AM
FOlks

SOme one can help me on this.

I had radio buttons Yes and No. When I click "Yes" I should see the some information, but when I click on no, the information should disappear.

Some one please help me on this. If you have sample, I can use it.

Khalid Ali
08-21-2003, 09:48 AM
This piece of code will do exactly that

<form id="form1" action="" onsubmit="">
<input type="radio" name="rg" value="yes" onclick="document.getElementById('div_1').innerHTML='Radio button <b>yes</b> is clicked';"/>Yes<br/><br/>
<input type="radio" name="rg" value="yes" onclick="document.getElementById('div_1').innerHTML='';"/>No
</form>
<div id="div_1"></div>

mandavae
08-21-2003, 06:54 PM
thank you very much. But how can use to display additional form fileds based on selection. if they select yes i need additional form fields are displayed. if click no, I need want to hide