広告を10秒間表示してから、埋め込みコードを読み込むコードがあります。Firefoxでは正常に動作していますが、IE9では、広告と埋め込みコードをバックグラウンドで同時に実行します。
<script type="text/javascript">
var nbsec = 10;
var c = 0;
var t;
var timer_is_on = 0;
var sum = 0;
function timedCount()
{
c = c + 1;
t = setTimeout("timedCount()", 1000);
sum = nbsec - c;
document.getElementById('chrono').innerHTML = "<br>Loading .. Please wait " + sum + "secondes";
if(c == nbsec) {
stopCount();
document.getElementById('mypub').style.visibility = 'hidden';
document.getElementById('mygame').style.visibility = 'visible';
document.getElementById('mygame').style.display = 'block';
document.getElementById('mygame').style.height = 'auto';
document.getElementById('mypub').style.height = '0px';
document.getElementById('mypub').style.padding = '0px';
document.getElementById('mypub').innerHTML = "";
}
}
function stopCount()
{
clearTimeout(t);
timer_is_on = 0;
}
</script>
<table border="2" align="center" color="F2FC7E">
<tr>
<td>
<div id="mypub" style="visibility: visible; text-align:center; padding:20px;">
<script>
..............
</script>
<div id="chrono" style="color:#FFF;"></div>
</div>
<div id="mygame" style="visibility: hidden;display:none; height:0px">
<param name="initial_focus" value="true">
<applet>
........................
</applet>
</div>
</td>
</tr>
</table>
<script type="text/javascript">
timedCount();
</script>
この問題を解決する方法はありますか?