function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DS777DS777 

Conditional call to action

I have command buttons on my page
and then based on javascript's value i would like to call the action.
 
  <apex:commandButton value=" Convert To Sales Order "  onclick="checkSOConv();" action="{!save}" status="ajaxStatus" rerender="main" />
                <apex:commandButton value=" Cancel " action="{!cancel}" />
 
How this can be achieved? Any help is appreciated.