changed post<add,edit> to ajax and jquery