added on click functionality to DialogWindows