I have used an iframe which looks like this:
<iframe style='width: 330px; height: 278px' scrolling='no' name="iframeId" class="advPlayer" id="iframeId" frameborder="0" src='../../player/iabpreview.php?adid=<?php echo $selectedAdIdx ?>&autoPlay=true'></iframe>
Whenever I click on a <div>
, I have to change the source of the iframe. I am using the following code:
if ($j.browser.msie) {
frames['iframeId'].window.location="../player/iabpreview.php?adid="+adId+"&autoPlay=true";
}else {
$j(".advPlayer").eq(0).attr("src", "../player/iabpreview.php?adid="+adId+"&autoPlay=true");
}
This works with Firefox, but not with Internet Explorer.
What code would work for Internet Explorer too?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…