Functions for sending ajax requests to separate file.