I have a pub in iframe, I have a button and I would like to make sure that the user is obliged to click on the ad before the button appears but I can not find how to do it . Thank you for your help
<form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>">
<input id="bouton" type="submit" style="color:black;" name="Envoyer" id="Envoyer" value="SEND"><br/>
<iframe scrolling="no" frameborder="0" height="90" width="728" src="http://www.website.com/ban.php?id=701&f=728x90"></iframe>
</form>
I tried :
<div id="pub" style="display:none;">
<input id="bouton" type="submit" style="color:black;" name="Envoyer" id="Envoyer" value="SEND">
</div>
<button onclick="document.getElementById('pub').style.display = 'block';"><iframe scrolling="no" id="pub" frameborder="0" height="90" width="728" src="http://www.website.com/ban.php?id=701&f=728x90"></iframe>
</button>
EDIT :
I tried with it also but I did not succeed:
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,0, 0, 0, 0, 0, false, false, false, false, 0, null);
document.getElementById("pub").dispatchEvent(evt);