call function of custom button in popup when button is clicked