Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am using this code for calculation of two textbox but my result it's not displaying on button click event.

C#
plugin.on('click', '#BtnBuyCard', function(){
                if($('#TxtByCardNo').val()=="")
                {
                alert("Please Fill Card Number");
                return false;
                }
                else
                {
                var Balance=(parseInt($('#<%=TxtByCardNo.ClientID%>').val()) * parseInt($('#<%=TxtByCardCost.ClientID%>').val()));
                $('#<%=LblCardBalance.ClientID%>').val(Balance);
                return true;
                }
            });


please help me.

Thanks in Advance.

Ankit Agarwal
Website Developer
Posted
Comments
thatraja 2-Jan-14 4:06am    
What's the error? Debug using tools like firebug or developer tools
Jain Nishant 2-Jan-14 4:57am    
Please use debugging for finding the error...
ZurdoDev 2-Jan-14 8:15am    
The previous comments are correct. Please debug it and narrow down the issue.
Put a debugger and see if it is going inside the event or not

1 solution

Replace this:
Quote:
$('#TxtByCardNo').val()

With:
$('#<%=TxtByCardNo.ClientID%>').val()
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900