View Full Version : Help On Forms

01-15-2003, 05:46 AM
This is the form that I need (passing text values)
Is it possible to pass the value to any of the Textareas I would like to in my page. or for Example:
Lets say I click on the textarea
and I want to pass my buttom value like this:

my text [ buttom value] area

<form name="TA">
<input type="button" value="1" name="B1" onclick="document.TA.A.value+=this.value">
<input type="button" value="2" name="B2" onclick="document.TA.A.value+=this.value">
<textarea name="A" cols="20" rows="3" >my text area</textarea>

01-15-2003, 06:31 PM
You've lost me

Roy Sinclair
01-15-2003, 07:47 PM
You're wanting to add the value declared for the button to the end of whatever value is in the Textarea right?

Try this:

<form name="TA">
<input type="button" value="1" name="B1" onclick="this.form.A.value=this.form.A.value + this.value">
<input type="button" value="2" name="B2" onclick="this.form.A.value=this.form.A.value + this.value">
<textarea name="A" cols="20" rows="3" >my text area</textarea>