added AJAX functionality to update the fields in the Events page