ajax setup and getting response from controller. make events class , using that create a json object and return