Sending proper codes and percentage values to the server.