File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: dynamic addition of numbers entered in textbox