Send set_location via post request
Add missing semicolon
Fix typo
Use window.location.pathname to set url for ajax set_location