+ 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.