Posted a reply to Easy and Simple, on the site WordPress.org Forums: <button id="savePaymentButton">Add Payment Info</button> <script type="text/javascript"> document.getElementById('savePaymentButton').addEventListener('click', function() { insert_event_code_here; ... }, false); </script>