If apex:commandButton is not working, check the below
1. In reRender attribute, check whether we are calling parent component Id and child component Id. If it is coded in that way, remove the child component Id since parent component Id is used.
2. Use <apex:actionFunction/> for calling Javascript methods.
Cheers!!!