I have a jQuery call request for a text field exchange event.
in my encoding, I raise the change event as
<asp:TextBox ID="txtTotalDeductions" Text="0" runat="server" ClientIDMode="Static" onChange="Deductions();" ></asp:TextBox>
and I have two div sections like
<div id="Total">1000</div>
and
<div id="NetTotal">0</div>
I need to calculate "NetTotal" by subtracting Total-txtTotalDeductions.
and my jQuery for deductions
// Calculation of residues.
function Deductions() { var result = new Object(); result.total = $("#Total").html(); result.totalDeductions = $("#txtTotalDeductions").val(); result.netTotal = result.total - result.totalDeductions; $('#NetTotal').html(result.netTotal); }
and when I run the application, the error is displayed as "Microsoft JScript runtime error:" Deductions "is undefined" and the error is here "
can someone help me with pls ..... thanks in advance
source share