I have a script that shows up an advertisement as the user opens a website. However, I want to make it so that when a user clicks a buton, the ad gets triggered and redirects the user to that website. I also want to make the button to cool down for 3 seconds, then let the user click on it again to go to a different URL. In short - a user clicks a button. It first executes the ad, then cools down for 3 seconds, then after the second click it executes a . Here's the :
<script type="text/javascript">
atOptions = {
'key' : 'key',
'format' : 'iframe',
'height' : 300,
'width' : 160,
'params' : {}
};
document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://www.variousformatscontent.com/key/invoke.js"></scr' + 'ipt>');
</script>