$(function () { var textBox1 = $('input:text[id$=FreightCharges]').keyup(foo); var textBox2 = $('input:text[id$=FuelSurcharge]').keyup(foo); var textBox3 = $('input:text[id$=FOV]').keyup(foo); function foo() { var value1 = textBox1.val(); var value2 = textBox2.val(); var value3 = textBox3.val(); var p1 = per(value1, value2, value3); $('input:text[id$=ServiceTax]').val(p1); } function per() { var sum1 = 0, p1 = 0; for (var i = 0, j = arguments.length; i < j; i++) { if (IsNumeric(arguments[i])) { sum1 += parseInt(arguments[i]); p1 = parseInt(sum1 * 12) / 100; } } return p1; } function IsNumeric(input) { return (input - 0) == input && input.length > 0; } });
p1 = Math.ceil(sum1 * 0.12);
function RoundedPct(quantity, percent) { return Math.ceil(quantity * percent / 100); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)