Started implementing ajax, but getting internal service error