Below is my code. I am calling this function on On-load and every-time when something get changed on server side.
funtion display() {
var costAmount = 0;
var minPrice = parseFloat('{!calc.Minimum_Price__c}');
var passth = parseFloat('{!calc.passth}');
alert("minPrice = " + minPrice + ", passth = " + passth);
<apex:repeat var="costPlan" value="{!calc.Non_Labor_Cost_Details__r}">
if('{!costPlan.Pass_Non_Pass_Thorugh_Cost__c}' == "Non-Billable to client") {
costAmount = parseFloat((parseFloat('{!costPlan.Cost_Amount_f__c}') + ((minPrice - passThorughCost) != 0 ?
(parseFloat('{!costPlan.Cost_Amount_f__c}') / (minPrice - passThorughCost) *
Discount) : 0)));
} else {
costAmount = parseFloat('{!costPlan.Cost_Amount_f__c}');
}
</apex:repeat>
}
Everything is working fine on onload but when i call is after change then still it displays old value. i am not getting updated values.
I check at server side that object it getting updated with latest values but still it displayes old value.
Any suggestions
Thanks
Everything is working fine on onload but when i call is after change then still it displays old value. i am not getting updated values.
I check at server side that object it getting updated with latest values but still it displayes old value.
Any suggestions
Thanks