This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes dynamic addition of numbers entered in textbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic addition of numbers entered in textbox" Watch "dynamic addition of numbers entered in textbox" New topic
Author

dynamic addition of numbers entered in textbox

sri kris
Greenhorn

Joined: May 23, 2008
Posts: 10
i need to have a texbox whic displays a sum of all values entered in toher textboxes. As the value gets changed in the other textboex the total value also should get changed. This should not be done after clicking on the submit button.
Vilmantas Baranauskas
Ranch Hand

Joined: Dec 20, 2006
Posts: 89
Seems like you need to implement it in JavaScript, not directly in Struts.


Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
sri kris
Greenhorn

Joined: May 23, 2008
Posts: 10
can you provide an example for that
Thanks in advance!!
Vilmantas Baranauskas
Ranch Hand

Joined: Dec 20, 2006
Posts: 89


JavaRanch didn't allow to post code sample with "onkeyup" and therefore I've replaced it by "on-keyup". You have to replace it back.
 
Don't get me started about those stupid light bulbs.
 
subject: dynamic addition of numbers entered in textbox
 
Similar Threads
Preserving State
Modify Primary-key?
have anyone got the solution?
PL/SQL substitution variable
handling cancel action effectively