You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Hi Everyone,

How do i get the sum value of 2 drop down list and populate in onto "sum" fields? I am using community edition. 

I have tried using this code but still dont work. Can anyone help?

<script type="text/javascript">

function compute() {

        var a = parseInt($('input[name=amount1]').val());

        var b = parseInt($('input[name=amount2]').val());

        var total = a+b;

        $('#sum').val(a+b);

}

</script>

<script type="text/javascript">
function compute() {
        var a = parseInt($('input[name=amount1]').val());
        var b = parseInt($('input[name=amount2]').val());
        var total = a+b;
        $('#sum').val(a+b);
}
</script

  • No labels