Hi,
To do this, you need to write JavaScript code.
There are two places these calculations can be performed:
It is much easier to do the calculations in the browser. This means some JavaScript code in the browser (i.e. in the HTML page) that performs the calculations you want.
- in the browser
- on the server
To do them on the server, you need to create an Ajax solution. This means JavaScript code in the browser (i.e. in the HTML page) and PHP code on the server.
Either method involves programming, and I strongly recommend you hire a programmer to do this. The server method is very complicated and needs a lot of experience to get right.
To get you started with the browser solution:If you can understand what that's doing, then you can progress to adding field values together.
- Load jQuery into your HTML page. Put this in the <head> section of your page:
Code:<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>- To display when a field (say it's called amount - with name="amount"), add this to your page just before the </body> close tag:
Code:<script type="text/javascript">$('input[name=amount]').change(function () { alert($(this).val()); });</script>
I hope that helps.
Bookmarks