J
Jeremy
Hi,
I am attempting to load an ad Banner to coincide with a piece of video
pre-roll. The following function is called which is supposed to create
an empty IFRAME. Once this IFRAME object is created javaScript should
then be able to open and write to the IFRAME. The following code seems
to work perfectly in I.E. however in Firefox doesn't want to work. If
anyone can help it would be greatly appreciated.
Thanks
Jeremy
JavaScript Source:
function FLA_HandleEmbedBanner(embedBanner)
{
var bannerHTML = embedBanner
var adFrame = document.createElement("IFRAME");
adFrame.setAttribute("src", "about:blank");
adFrame.setAttribute("frameborder", 0);
adFrame.style.width = 300+"px";
adFrame.style.height = 250+"px";
adFrame.id = "bannerIFrame"
adFrame.frameBorder = 0;
adFrame.scrollable = "no";
document.body.appendChild(adFrame);
adFrame.className = "bannerWindow"
document.frames["bannerIFrame"].document.open();
document.frames["bannerIFrame"].document.write("<html><body style =
'background-color:#000000;padding:0px;overflow:hidden;margin:0'>"+bannerHTML+"</body></html>");
document.frames["bannerIFrame"].document.close();
}
function destroyEmbededBanner()
{
document.getElementById("bannerIFrame").style.visibility =
"hidden"
}
</script>
I am attempting to load an ad Banner to coincide with a piece of video
pre-roll. The following function is called which is supposed to create
an empty IFRAME. Once this IFRAME object is created javaScript should
then be able to open and write to the IFRAME. The following code seems
to work perfectly in I.E. however in Firefox doesn't want to work. If
anyone can help it would be greatly appreciated.
Thanks
Jeremy
JavaScript Source:
function FLA_HandleEmbedBanner(embedBanner)
{
var bannerHTML = embedBanner
var adFrame = document.createElement("IFRAME");
adFrame.setAttribute("src", "about:blank");
adFrame.setAttribute("frameborder", 0);
adFrame.style.width = 300+"px";
adFrame.style.height = 250+"px";
adFrame.id = "bannerIFrame"
adFrame.frameBorder = 0;
adFrame.scrollable = "no";
document.body.appendChild(adFrame);
adFrame.className = "bannerWindow"
document.frames["bannerIFrame"].document.open();
document.frames["bannerIFrame"].document.write("<html><body style =
'background-color:#000000;padding:0px;overflow:hidden;margin:0'>"+bannerHTML+"</body></html>");
document.frames["bannerIFrame"].document.close();
}
function destroyEmbededBanner()
{
document.getElementById("bannerIFrame").style.visibility =
"hidden"
}
</script>