Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
On Add to cart button click i m showing popup on that on label showing price for that product and in textbox user enters quantity. after entering quantity total price should be calculate and display on label..
Posted

use text change event of text box
 
Share this answer
 
You can take the help of onblur() function. Below i have given a example.

XML
<script type="text/javascript">
    function f1()
    {
     document.getElementById('<%= Label1.ClientID %>').innerHTML = document.getElementById("Text1").value * 1000;
    }
    </script>



<input id="Text1" type="text" onblur="f1()" />
 
Share this answer
 
Comments
deepakaitr12345 8-Feb-13 7:45am    
That's corerct but doing this one thing to remember that is.

At run time see the client id of control is it changing or not if not then you don't have to change any thing if yes then do the code accordingly...

Thanks

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