Here is an example of what you are trying to achieve on livedemo: http://livedemo.exadel.com/richfaces-demo/richfaces/jsFunction.jsf?c=jsFunction&tab=usage
Try to follow that. Comparing with your example, try changing to (form needed around the jsFunction, no need to submit request on button click):
<a4j:form>
<a4j:jsFunction name="test" reRender="#{myBean.id}" oncomplete="alert('#{myBean.id}');">
<a4j:actionparam name="id" assignTo="#{myBean.id}" />
</a4j:jsFunction>
<a4j:commandButton onclick="test('outputPanel1'); return false;"/>
<a4j:commandButton onclick="test('outputPanel2'); return false;"/>
<a4j:commandButton onclick="test('outputPanel3'); return false;"/>
</a4j:form>