A small function to simplify your raw javascript ajax calls