Iframe content loading in Div using JS: Works in FF not in IE6
Hi,
so I have a JS function to display various content in a popup DIV.
The user clicks on a link which displays a div containing an iFrame.
When the JS function is called it writes HTML to the Div to include the iframe.
See below for the part of the Javascript function which creates the code:
Code:
vid_iframe_code = '<iframe src="' + urlDisplay + '" id="the_video_in_page" name="the_video_in_page" frameborder="0" marginheight="0" marginwidth="0" allowtransparency="yes" scrolling="' + scrolling +'" style="border:0px; border-style:none; width:'+ setWidth + 'px; height:560px; margin:0; padding:0;"></iframe>';
document.getElementById(ajax_show_page_holder).style.visibility = "visible";
document.getElementById(ajax_show_page_holder).style.display = "block";
document.getElementById(ajax_show_page_holder).style.top = ypos + "px";
document.getElementById(ajax_show_page).style.overflow = "hidden";
document.getElementById(ajax_show_page).innerHTML = vid_iframe_code;
The Div code can be seen here:
Code:
<div id="ajax_show_page_center">
<div id="ajax_show_page_holder">
<div id="ajax_inside">
<div class="boxAjaxTop"><h2>AIR 2 AIR Ltd.</h2><a class="buttonGo close right" href="javascript:// Close" onclick="javascript:A2AClose();"><b>Close</b></a></div>
<div id="ajax_show_page" class="clear"></div>
<div class="boxAjaxBottom"></div>
</div>
</div>
</div>
It works fine in IE 7 and FF but in IE 6 the actual iframe content is not displayed in the div. However if I right click and refresh the frame then everything works as it should.
Does anybody have any ideas?
cheers
Thomskint, August 26th, 2009 10:39 AM
Bookmarks