Manage both buttons with a js func