Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have three textboxes and a button(edit button). when i click on edit button the three textboxes fill as their value and as i expect it showing correct.
and textchange on first tow textboxes value multiply and show this value into third textbox.
i am using jquery my code is"

JavaScript
function calculateTotalPrice(categoryID, divNo) {
            debugger;
            var Qty = $("#POAItem_" + categoryID + "_" + divNo).find("#POA_ItemQty_" + categoryID + "_" + divNo).val();
            var Unit = $("#POAItem_" + categoryID + "_" + divNo).find("#POA_ItemUnitPrice_" + categoryID + "_" + divNo).val();
            var TotalPrice = (Qty * Unit).toFixed(2);
            $("#POAItem_" + categoryID + "_" + divNo).find("#POA_ItemTotalPrice_" + categoryID + "_" + divNo).val(TotalPrice);

}
int Qty i am getting correct value, and unit also getting correct value and TotalPrice also getting correct value but
JavaScript
$("#POAItem_" + categoryID + "_" + divNo).find("#POA_ItemTotalPrice_" + categoryID + "_" + divNo).val(TotalPrice);
not replace last value please help
Posted
Updated 12-Oct-14 22:35pm
v2
Comments
[no name] 13-Oct-14 5:35am    
The question is not actually clear. Please say what exactly you want in the last statement!! that is here:
$("#POAItem_" + categoryID + "_" + divNo).find("#POA_ItemTotalPrice_" + categoryID + "_" + divNo).val(TotalPrice);
[no name] 13-Oct-14 7:31am    
Elaborate your problem clearly
Arora_Ankit 14-Oct-14 11:31am    
ID is correct?

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