sum up values of inputs
<p>i'm trying to do is get all value of 10 textbox and get there total and print it on submit. I did <strong>var id = getelementbyid(id)</strong> then <strong>x=var1+var2</strong> but nothing happens. Please help me on this.</p>

<pre>
&lt;script type=&quot;text/javascript&quot;&gt;
  function test(){ 
  document.getElementById('out').style.display = &quot;block&quot;;
  return false; 
  } 
  &lt;/script&gt;
&lt;form action=&quot;&quot; onsubmit=&quot;return test()&quot;&gt; 
  &lt;div class=&quot;selftest&quot;&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text1&quot; /&gt;&lt;label&gt;  I Love Animals&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text2&quot; /&gt;&lt;label&gt;  I Pay Close Attention To Details&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text3&quot; /&gt;&lt;label&gt;  I Communicate Well With Others&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text4&quot; /&gt;&lt;label&gt;  I Am Very Dependable&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text5&quot; /&gt;&lt;label&gt;  I Get Along Well With Others&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text6&quot; /&gt;&lt;label&gt;  I Am In Good Physical Shape&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text7&quot; /&gt;&lt;label&gt;  I Understand I May Be Bitten&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text8&quot; /&gt;&lt;label&gt;  I Handle Stress Well&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text9&quot; /&gt;&lt;label&gt; I Am Well Organized&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;text&quot; size=&quot;1&quot; id=&quot;text10&quot; /&gt;&lt;label&gt; I Am Intelligent&lt;/label&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Submit Answers&quot; /&gt;&lt;/p&gt; 
  &lt;/div&gt; 
  &lt;/form&gt; 
&lt;div id=&quot;out&quot; style=&quot;display:none;&quot;&gt; 
  Here are the results of your Veterinary Technician Self Test: &amp;lt;result&amp;gt; Obviously veterinary technicians must love animals, but they must love to be around and communicate with people also because they spend much of their time interacting with co-workers and pet owners. An individual should be able to take a leadership role and be able to talk with strangers, to be a good candidate for a veterinary technician career. Those who want to become veterinary technicians must have good communication skills and have the ability to work well with others. They must also be well-organized and be able to pay attention to detail. They must be of above average intelligence and have a good understanding of math and science. It is necessary that a veterinary technician be dependable since an animal’s life may rest in their hands when treatments must be delivered in a timely manner. A veterinary technician’s job can be very demanding. He or she must be able to spend hours on their feet and have the ability to lift and restrain animals. Unfortunately, being bitten is part of the job. It does not occur often, but a veterinary technician must realize that it is a real possibility. Due to the possibility of emergency situations, a veterinary technician must be able to handle stress well. From the results of the self test, you have many of the characteristics needed to work in this field, but you may need to do some more research before you go any further. Start by reading &lt;a href=&quot;http://www.vettechuniversity.com/veterinary-technician-career-information/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;Veterinary Technician Career Information&lt;/strong&gt;&lt;/a&gt;. 
  &lt;/div&gt;

</pre>

<p>Please ask question if you don't understand my question
:)</p>
