I have a query regarding calling jQuery for textbox onchange event.
in my coding am calling onchange event as
<asp:TextBox ID="txtTotalDeductions" Text="0" runat="server"
ClientIDMode="Static" onChange="Deductions();" ></asp:TextBox>
and I have two div sections as
<div id="Total">1000</div>
and
<div id="NetTotal">0</div>
I need to calculate the "NetTotal" by subtracting the Total - txtTotalDeductions.
and my jQuery for Deductions is
//Calculate deductions.
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 shows like "Microsoft JScript runtime error: 'Deductions' is undefined", and the error lies here ""
can anyone help me out pls.....thanks in advance