Generate body with Javascript