I would like to specify a better code which will trigger a input radio and execute dedicated textfield.
Here’s what i am talking about (sorry im not that very good at jquery so pls pardon me).
i post 2 samples only aside from original 32 questionnaires that are listed in my code.
<table width="817" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="317" height="25">1. Use of adjoining property</td>
<td width="10" height="25">:</td>
<td width="480" height="25">
<input type="radio" name="no1" value="Yes" />Yes
<input type="radio" name="no1" value="No" />No
</td>
</tr>
<tr class="notes">
<td height="25" align="right">Notes</td>
<td height="25">:</td>
<td height="25">
<input name="notes1" type="text" id="notes1" size="65" value="" />
</td>
</tr>
<tr>
<td height="25">3. Access to dirt or paved road</td>
<td height="25">:</td>
<td height="25">
<input type="radio" name="no3" id="radio8" value="Yes" />Yes
<input type="radio" name="no3" id="radio9" value="No" />No
</td>
</tr>
<tr class="notes">
<td height="25" align="right">Notes</td>
<td height="25">:</td>
<td height="25">
<input name="notes3" type="text" id="notes3" size="65" value="" />
</td>
</tr>
</table>
i did try to create each jquery but wanted to simplify the code.
var notes = $('tr.notes');
notes.hide();
$('input[value="Yes"]').click(function () {
notes.slideDown();
});
i did do some research here but can’t elaborate the structure. i appreciate your help. many thanks.
This will try to detect if the input radio is changed, it will detect if the clicked it will check the value and show the notes.
Please check this : Demo