Forum Moderators: open
for example
this is the page
<snip>
i need to delay the appearance on the first add <blue one >
for like 8 or 9 seconds
** if you wait in the page for 15 second you will see that the download link will appear so i want to delay the add before it for 8 second by the same way
i really need your help , thank you any way
this is the code
<script type="text/javascript">
<!--
function fc() {
if(c>0){
document.getElementById("dl").innerHTML = ' ';
c=c-1;
setTimeout("fc()", 1000);
} else {
var tt = '<h3 style="font-size:12pt;"><a href="<?php echo $baseurl . "/n.php?u=" . $i; ?>">click here to continue</a></h3>';
document.getElementById("dl").innerHTML = tt;
}
}
var c=15;
if (window.location.hash == "#dlt")
c = 0;
//-->
</script>
<script type="text/javascript">
<!--
fc();
//-->
</script>
However, if you put the adsense code in a div with an ID of "delayed_div" then you could toggle that div's display setting using the timer function. If you did that, it could be as simple as adding another conditional block inside your existing function:
if(c>8){
document.getElementById("delayed_div").style.display = 'none';
} else {
document.getElementById("delayed_div").style.display = 'block';
}