Add client side js to make the post request