click event and empty function for server call