View Full Version : button activated text area?
freshrod
09-17-2002, 03:07 PM
Greetings-
I've got a page with a 2 column table, rows of numbered buttons on one side, blank text areas on the other.
Could I get an example of how I would have text appear in the adjacent text area when the button is clicked? (kinda like a Q&A thing)
Anticipatory thanx
ShriekForth
09-17-2002, 06:02 PM
Like this?
<form name="temp">
<table>
<tr>
<td><input type="button" name="button1" value="A1" onClick="document.temp.text1.value='answer 1'"></td>
<td><input type="text" name="text1"></td>
</tr>
<tr>
<td><input type="button" name="button2" value="A2" onClick="document.temp.text2.value='answer 2'"></td>
<td><input type="text" name="text2"></td>
</tr>
</table>
</form>
They could be radio boxes rather than buttons, even links, the important part is the onClick="document.FORM_NAME.FIELD_NAME.value='answer 1'".
ShriekForth
adios
09-17-2002, 06:07 PM
If it's all in one form:
FIELD_NAME.value
onClick="text1.value='answer 1'">
...unless you're being paid by the word...:cool:
freshrod
09-19-2002, 03:10 PM
Yes, it works wonderfully. If I can do anything in return, let me know via my website: www.freshrod.com
I'm no programer, but I do images and music.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.