HTML and Javascript

I would like to a text box asking user
to enter a 5 digit number. I want a add button adjacent to the text box. on clicking the add button I want the number entered in text area to appear inside  a  table.
I think we need to combinea javescript and html , i would like to know as to how to do this.
ramani
ramani081399Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

deepchandaCommented:
<script>
function putval() {
 document.myform.text1.value = document.myform.gettext.value;

}

</script>

this is the text box
<input type=text name="gettext">

add button
<input type=button name="add" onClick="putval()">

your textarea
<textarea name="text1"></textarea>

put the <script> tags within your head tags, and myform is the name of your form

DC
0
ramani081399Author Commented:
deepchanda,
It worked great. I forgot to mention one more property i wanted to capture.that is i enter one number and it get inserted into the text area.when i enter the second number the first number goes away in the textarea.i want this to remain so that we can finally have a list of numbers entered.how can we do this?and also be able to show all the numbers in the text area numbered ie 1  xxxxxxx
   2  yyyyyyy

ramani
0
leite_floripaCommented:
answering the second quastion:

change the script to:

<script>

counter = 1

function putval() {
    document.myform.text1.value = document.myform.text1.value + counter + " " + document.myform.gettext.value + "\n";
    counter++;
}

</script>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ramani081399Author Commented:
Leite Floripa,
Thank you very much .It works
Ramani
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.