adding values to text boxes

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
wickedbob
Forum Newbie
Posts: 5
Joined: Tue Aug 06, 2002 11:22 pm

adding values to text boxes

Post by wickedbob »

i want to add some text from one text box in a form into a second text box in a different form (same html page). i want this text to be added at the end of what is already contained in the second text box.
does anybody know the correct syntax for achieving this in javascript code?

i envision that it would be something similar to:
document.form2.textbox.value=(document.form2.textbox.value+document.form1.textbox.value);

but i have the feeling that this is not correct.
any ideas?

BoB.
Geschi
Forum Newbie
Posts: 21
Joined: Wed Jul 10, 2002 3:21 am
Location: Germany

Post by Geschi »

Did you give it a try? For me it looks allright, though you have to commit the text in fórm 1, of course.
wickedbob
Forum Newbie
Posts: 5
Joined: Tue Aug 06, 2002 11:22 pm

Post by wickedbob »

scary spice!

i tried it and it worked.
my javascript skills must definitely be getting better.

8O

BoB.
Post Reply