How to use button to popup JS widget (as provided)

A third party widget was provided to me that I’d like to set within a button. I tried setting a on_click attribute, and put the script in the value, but that doesn’t seem to be right.

Conversely, I could try and style the resulting link (from the code widget) like a button?

Here is the js (without closing brackets)

script>var _msdaf_id= ‘f320c24333688’ </script

Any recommendations are welcome. Forgive me if this is simple and I’m just not seeing it.