We help IT Professionals succeed at work.
Get Started

What is the best way to display a calculated value in an html page?

Last Modified: 2013-11-19
Hi All:
I have a bunch of fields that are calculated onblur and the total is kept track of and submitted to the database using a hidden input. The calculated value currently looks like this:
<tr><td><input id=1 value=100 onBlur=runrecalculate></input></td></tr>
<tr><td><input id=2 value=200 onBlur=runrecalculate></input></td></tr>
<tr><td><input id=3 value=300 onBlur=runrecalculate></input></td></tr>
<tr><td class="classtext"><input id=inputSum  value=number type=hidden/> 600</td></tr>

The inputSum needs to change the "text" of the td with the class classtext...but, I don't know how to access the text in the cell..Is it better to change the hidden input to a textbox, or to use a label...the problem is, the value isnot changing, I think each browser is handling this differently and I don't know why...would it be better to just use a textbox or a label, if so, please send code...HELP PLEASE:)
BTW, this is not my code...it was there already and I need to make it work...

Watch Question
Top Expert 2005
This problem has been solved!
Unlock 3 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE