i want to show waiting spinner on my remote-action call on command button with onClick event. i have wrote following code for that but its now working :
VisualForce Page:
<apex:actionStatus id="WORKING" >
//loading spinner code.
</apex:actionStatus>
<apex:commandButton status="WORKING" value="click here" onclick="doCheckRun(true);return false;"></apex:commandButton>
<script>
function doCheckRun(preview){
Controller.remoteActionFunction();
}
</script>
now when i click on command button then status="WORKING" is now showing the spinner if i add like this it is working :
<script>
ShowSpinner();
</script>
<apex:actionFunction name="ShowSpinner" reRender="rerender" status="WORKING"/>
so when i add onClick event on command button its not working.
any help would be appreciated.