Hi All
I am working on sample code that multiplies quantity with the price of a product.
I want to add 15 % VAT to the total.
The first bit works fine but adding the 15% VAT gives a syntax error.
Here is the code:
var ctrlPrice = Runner.getControl(pageid, 'Price');
var ctrlQuantity = Runner.getControl(pageid, 'Quantity');
var ctrlTotal = Runner.getControl(pageid, 'Total');
var ctrlTotalInc = Runner.getControl(pageid, 'TotalInc')
function func() {
ctrlTotal.setValue(parseFloat(ctrlPrice.getValue()) * parseFloat(ctrlQuantity.getValue()));
ctrlTotalInc.setValue(parseFloat(ctrlTotal.getValue())* 1.15));
};
ctrlPrice.on('keyup', func);
ctrlQuantity.on('keyup', func);
ctrltotal.on('keyup', func);
Microsoft JScript compilation error: Expected ';'
Would appreciate any pointers on this.
Best
Peter G