Simple ajax helper for JavaScript