i have file title ad.php , contains
<a href="http://www.google.ro"><img src="bannerimg.png"></a>
and in file have:
<iframe src="ad.php"></iframe>
question how count click on iframe!
just if using javascript....
var clik = 0; $('#myframe').click(function(){ clik++ alert(clik); });
update ajax
$(document).ready(function(){ $('#myframe').click(function(e){ e.preventdefault(); $.ajax({ url : "countclick.php", success: function(){ alert('done'); } }); }); });
then in php file countclick.php
retrieve current value database, , increment , update.
or execute increment query directly, without retrieving current value im assuming know how in php/mysql , im not gonna post part
Comments
Post a Comment