Hello,
The iframe works perfectly if I add it to the header but I would like the button to be in the body of the site instead of the header. Chimp has some other instructions for using a custom button but I can’t get it to work, can you see what may be causing the issue?
Here is the code that is supposed to work for the pop-up window:
<div id="custom-chimp-button" width="200px" height="200px" style="background: red; cursor: pointer; padding: 10px; margin: 10px;"> <strong>Button</strong><br> You can click on this div! It'll open the form.</div>
<script type="text/javascript" src="http://chimp.net/widget/js/loader.js?OTM4MTQsbGFyZ2Usb3JhbmdlLFRoZSBCdW5rZXIgWW91dGggTWluaXN0cnkgSW5jLixCZW5lZmljaWFyeQ%3D%3D" id="chimp-button-script" data-hide-button="true" data-script-id="main"> </script>
<script type="text/javascript"> $(document).ready(function() { $("#custom-chimp-button").on("click", function() { var frame = document.getElementById("chimp-form-main"); var content = frame.contentWindow; content.postMessage("open-chimp-frame", "*"); frame.style.opacity = 1; frame.style.display = "block"; }); }); </script>
My URL is https://goo.gl/t529kJ
The instructions on how to use this ccustom button are here: http://help.chimp.net/article/88-donation-button#custom
Thanks.