How to clear text fields in jpanel?

How do you write code that allows me to have two text fields that place the inputs into a div?

  • heres my class project that i cant figure out: I need to code a javascript that has 2 text inputs like below. <input type="text" id="topText /> <input type="text" id="bottomText"/> Then, when a person does this and presses submit, it goes to 2 different areas over an image-top and bottom. So far I have this, but it wont work! its killing me and its due soon. <script type="text/javascript"> function make () { var top = document.getElementById('top_txt').inner… document.write("top_txt").innerHTML=… var bottom = document.getElementById('generator').inn… document.write('bottom'); } </script>

  • Answer:

Reese at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

if <input type="text" id="topText" /> and the id = topText then var top = document.getElementById('topText').inner… and not var top = document.getElementById('top_txt').inner… make sure "id" is the same as ".getElementById('id')"

[TERMiNAL]

Related Q & A:

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.