How to Compute fields on the fly I have content type having fields as follows. 

first

second

third

Sum1 (first + second +third) - computed filed

xxxx

yyyy

zzzz

Sum2 (xxxx+yyyy+zzzz) - computed field

Grand Total (sum1 + sum2) - computed field

I could achieve this by using computed field module. When I save node, I could able to find sums and Grand Total.

My problem is client wants to see  sum1 filed in edit/create form and also wants to update sum1/sum2/Grand Total fields on the fly (dynamically).
There are couple of content types having the same requirement.

Before start to write a custom module, I would like to know alternates for this.Any suggestions?
This sounds like cashier functionality. There has been some effort for D6, see Drupal POS (Point of Sales) System. I haven't used this.

Ideally, this would be done with JavaScript (I have once done it for a non-Drupal system).

A cheap workaround would be the Save &amp; Edit module, where you just save the node and continue editing it, effectively updating the calculations. On demand, not automatically.

A smoother workaround would be updating (on demand) the form with ajax. Ajax module  has no D7 version, but in the issue queue is mentioned this sandbox project which supposedly can ajaxify the node edit form:
Asaf (ajax submit for any form).

You need one extra module for actually displaying Computed field on node edit form: Field extra widgets. Select the widget "read only".