This topic is locked
[SOLVED]

 Sum of values

9/25/2012 6:19:22 AM
PHPRunner General questions
C
ckapote author

I see that
http://xlinesoft.com/phprunner/docs/how_to_calculate_values_on_the_fly.htm
i change it to following but cannot get the sum of values price + quantity correctly:
var ctrlPrice = Runner.getControl(pageid, 'Price');
var ctrlQuantity = Runner.getControl(pageid, 'Quantity');
var ctrlTotal = Runner.getControl(pageid, 'Total');
function func() {
ctrlTotal.setValue(Number(ctrlPrice.getValue()) + Number(ctrlQuantity.getValue()));
};
ctrlPrice.on('keyup', func);
ctrlQuantity.on('keyup', func);

C
ckapote author 9/25/2012

So finally i found it
var sum=0;

sum=(Number(ctrltotalvolumeweight.getValue()) +Number(ctrltotalvolumeweight1.getValue()));

ctrlvolumeweight.setValue(sum);
that could be posted from someone that is replying to queries to save me a lot of time !!!!!