Corrected POST URLs in the JavaScript