How to clear text fields in jpanel?

I want to have a textarea with variables that can be edited by using seperate text fields. How can I do this?

  • Working on a webpage... I want to have a form with several text fields to enter variables and have a textarea field below that combines those variables with other text.

  • Answer:

    Look into javascript or php.

timrosen... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Your question is VERY vague. One answerer said use javascript or PHP. You likely will need Javascript, but not PHP. PHP can't do anything until you click the submit button as it is server-side. Javascript is client-side (meaning it works on your browser and local pc) so it can work within the web page before a submit button is pushed on the form. You can have a textarea and if I remember correctly, you'll need to name it, name="textarea" (you can call it anything you want). I believe most HTML courses do not teach you to name form field elements. But you'll need to name them so the javascript knows which fields you're talking about. You'll need to name your text fields as well. Ok, so the javascript can take what is typed into a text field and place it into the text area. You'll need to put a javascript command inside each <input .. /> tag called the onChange="" What this means is that each time the text area is changed, the javascript will perform a function. I hope this helps you some, but like I said, your question is not very clear as to exactly what you need. Brian

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.