You need to sign in to do that
Don't have an account?
dhanamjaya damaragunta 24
how to get updated controller values in Java script
Hi All,
I have a scenario,I am calling controller method from JS using action function upon clicking the command button like below
<apex:commandButton value="Submit"
rendered="{!showSubmitButton}" onclick="savePartsOrderRecords();" reRender="partsOrderForm" />
Action funtion: <apex:actionFunction action="{!saveRecords}" name="savePartsOrder"/>
JS code:function savePartsOrderRecords(){
if(validateOrderParts() && validatePartsOrderTotal()){
savePartsOrder();
//alert('{!objname.status__c}');
}
}
In my controller i am updating one picklist value named as Status.if I try to get the status by using '{!objname.status__c}' in JS code (alert line)after savePartsOrder() its not giving updated value
I have a scenario,I am calling controller method from JS using action function upon clicking the command button like below
<apex:commandButton value="Submit"
rendered="{!showSubmitButton}" onclick="savePartsOrderRecords();" reRender="partsOrderForm" />
Action funtion: <apex:actionFunction action="{!saveRecords}" name="savePartsOrder"/>
JS code:function savePartsOrderRecords(){
if(validateOrderParts() && validatePartsOrderTotal()){
savePartsOrder();
//alert('{!objname.status__c}');
}
}
In my controller i am updating one picklist value named as Status.if I try to get the status by using '{!objname.status__c}' in JS code (alert line)after savePartsOrder() its not giving updated value
with regards
shareit (https://shareit.onl/) UC browser (https://www.ucbrowser.vip) MX player (https://mxplayer.pro/)