Ability to receive data/errors in custom.js

The ajax function in serverPost will now create an alert if the server
returns an error or no response. It can also receive JSON from the
server in serverPost(). A function must be passed in to use this data.