My aim is that when one of the radio button is clicked, a text field appears under it.
here is my table:
[code=html] <table width=”381″ border=”0″>
<tr>
<td width=”125″><label>
<input type=”radio” name=”radio” id=”Your Name” value=”Your Name”>
Your Name</label></td>
<td width=”144″><label>
<input type=”radio” name=”radio” id=”Personal Text” value=”Personal Text” onclick=”showinput(this.value);”>
Personal Text</label>
<label> </label></td>
<td width=”98″><label>
<input type=”radio” name=”radio” id=”None” value=”None”>
None</label></td>
</tr>
<tr>
<td> </td>
<td><div align=”center” id=’debug’></div></td>
<td> </td>
</tr>
</table>
And iI created this simple function called [FONT=”Courier New”]showinput[/FONT]. But it doesn’t seems to work.
Why is that?
Here is my function:
[code=html]function showinput(el){
{
put(‘<input type=”text” name=”Personal Textbox” id=”Personal Textbox”>’);
}
}
the put is a function that shows in a div. (in this case, debug).
[code=html]function put(text){
obj = document.getElementById(‘debug’);
obj.innerHTML = text;
}
What is wrong with the showinput function?
… I know this is pretty easy for some, but it ain’t for me ?
Thanks
Cheers,
rwt