bacterozoid
07-19-2002, 10:55 PM
Ok, well I have been dinking around with my big new JavaScript book (JavaScript Bible 4th ed.) and I am around to objects and methods (Which I do know a bit about because I have been troubleshooting and manipulating other JavaScript scripts before) and don't know
1. if it is even possible, and
2. if so, how to do it.
Code:
<form NAME="clickme">
<input type="button" value="Write Text" name="button" onClick="one()"></p>
</form>
<script language="javascript">
function one()
{
document.form.formbox.write('Hi!')
}
</script>
<form name="form">
<textarea rows="2" cols="20" name="formbox"></textarea>
</form>
As you can see, clicking on the button tells it to run function one() which I am trying to get to write text into the textarea. Any way this can be accomplished?
Thanks.
1. if it is even possible, and
2. if so, how to do it.
Code:
<form NAME="clickme">
<input type="button" value="Write Text" name="button" onClick="one()"></p>
</form>
<script language="javascript">
function one()
{
document.form.formbox.write('Hi!')
}
</script>
<form name="form">
<textarea rows="2" cols="20" name="formbox"></textarea>
</form>
As you can see, clicking on the button tells it to run function one() which I am trying to get to write text into the textarea. Any way this can be accomplished?
Thanks.