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:
Here you go -- http://jsfiddle.net/UVmDX/
Reese at Yahoo! Answers Visit the source
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:
- How to create text fields dynamically?Best solution by Stack Overflow
- How to write code to go through web pages automatically and get the required information?Best solution by Stack Overflow
- How to wrap jQuery function in a div?Best solution by Stack Overflow
- How do you write a code for myspace?Best solution by Yahoo! Answers
- How do I write a resume for a part-time job?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.