jQuery in Action, 3rd edition
The moose likes JSF and the fly likes Javascript Calculation Rendered value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Javascript Calculation Rendered value" Watch "Javascript Calculation Rendered value" New topic

Javascript Calculation Rendered value

Scott Minor

Joined: Nov 05, 2001
Posts: 5

I have a field in a JSF form that is bound to a database field that is really a calculated value, depending what the user enters into the value field the calculated values needs to change and be stored. I have written a java script function that does the calculation and updates the screen, but when I try to save the value with the submit button I get the old value for the calculated field. Not sure why this is happening.

Any help is appreciated.
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
Does the updated value reflect in the textfield? Try to alert out the value of this textfield when you click submit and see what you get.

Experience and talent are independent of age
Scott Minor

Joined: Nov 05, 2001
Posts: 5

Yes the value is updated in the textfield by when I save the data to the database it doesn't show the new value. Its still the old one.
I agree. Here's the link: http://aspose.com/file-tools
subject: Javascript Calculation Rendered value
It's not a secret anymore!