Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<script> function processCancellation(btn){ btn.disabled = true; btn.value = "Please wait.."; processCancel1(); // actionfunction } </script>
https://developer.salesforce.com/forums?id=906F000000095moIAA
I implemented a similar logic in one of my projects.. here is the code
// add this before your apex:form
//add this after your apex:form
<apex:actionFunction action="{!processCancellation}" name="processCancel1" />
//use this for the button
<apex:commandButton id="finish" value="Finish" onclick="processCancellation(this);return false;" />
So, onclick of the button the javascript method will be executed processCancellation(this) when the javascript execution completes it calls the action function
processCancel1
"{!processCancellation}" in the action is the call to your method in apex
Ta
Vish