client side code to update field (javascript)
-
i am creating a appraisal form and i need to right a client side code that will auto-update on the client side to reflect changes before saving it to the database, i know it can be done using javascript. here my fields kra_value agreed_target_dist weighted_target rating kra_score weighted_target = kra_value * agreed_target_dist kra_score = weighted_target * rating the two fields being calculated should be read-only and values should be reflected before being saved to the database. Any help as soon as possible will be greatly appreciated, thanks in advance
Ferron
-
i am creating a appraisal form and i need to right a client side code that will auto-update on the client side to reflect changes before saving it to the database, i know it can be done using javascript. here my fields kra_value agreed_target_dist weighted_target rating kra_score weighted_target = kra_value * agreed_target_dist kra_score = weighted_target * rating the two fields being calculated should be read-only and values should be reflected before being saved to the database. Any help as soon as possible will be greatly appreciated, thanks in advance
Ferron
What you need to do is have some event handler. The auto-updating will be fired by some event (click of button, entry into text field, getting or losing focus...) then in the event handler calculate what you need and update the page accoringly. Here is some more help ^
Yusuf