Try the following. Open up the user control ProductVersions.ascx
In there, look for the btnAdd_Options button.
Add
onclientclick="myfunction();"
This should fire your own javascript function when the button is clicked.
I tested with a simple 'alert' dialog and this seems to work, the code continues when that is closed.
If you want to do something more elaborate, this might help:
https://stackoverflow.com/questions/21227506/how-to-call-a-javascript-function-before-and-after-button-click-event-call-in-as
It shows how to run javascript after the server side click event, using registerscripts. But this is more complicated in my experience, the clientclick one is best if you can make your code run that way.