Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I add an apex:commandButton to a page doing the following:

  • Executing an apex:actionFunction
  • ReRendering some parts of the page (with reRender="")
  • NOT redirect to another page / refresh actual page.


share|improve this question
up vote 3 down vote accepted
<apex:commandButton value="Do something" onclick="actionFunction(); return false;" />
<apex:actionFunction name="actionFunction" action="{!action}" rerender="someArea" />
share|improve this answer
You are my hero. thanks @sfdcfox – jpmonette Jun 26 '14 at 19:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.