Running a script in response to onclick()

You will implement the custom JS code. Then it can work perfectly.