[thelist] Dynamic Text changes
Karen J. Bowen
lists at miinx.com.au
Fri Sep 20 03:38:01 CDT 2002
Mark Anderson wrote:
> I'm trying to create a javascript that takes the content of one
> textbox on a webpage and use the onChange event to add this text to
> other text I already have in the textarea text control. I hope that
> clarifys it.
Hi Mark, what browsers are you targetting?
The following works in Moz:
-------- js code ----------------
function swapIt() {
var elTb = document.getElementById('textbox_1').value;
var elTa = document.getElementById('textarea_1').value;
elTa = elTa + " " + elTb;
}
-------- form code --------------
<form>
<input type="Text"
name="textbox_1"
id="textbox_1"
value="blah blah"
onchange="swapIt();">
<br>
<textarea
cols="20"
rows="10"
name="textarea_1"
id="textarea_1">original text</textarea>
<br>
</form>
---------------------------------
HTH
Karen
-------
Miinx Design & Development
e :: karen at miinx.com.au
p :: 0413.880.302
w :: www.miinx.com.au
More information about the thelist
mailing list