[thelist] Dynamic Text changes
Mark Anderson
marke.anderson at btinternet.com
Fri Sep 20 04:18:01 CDT 2002
Karen,
Thanks for that I have been told it must be cross browser compatible so I
guess at least IE and Netscape. Am I correct in assuming Netscape and Moz
are similar?
Mark
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Karen J. Bowen
Sent: 20 September 2002 09:38
To: thelist at lists.evolt.org
Subject: Re: [thelist] Dynamic Text changes
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
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list