iframe does not work in Chrome

bumpywowus

Junior Member
Joined
Nov 23, 2011
Messages
125
Reaction score
29
Hi,
On page load I have a modalpopup. The modal Popup's source is from another page on my website, which contains an iframe. For some reason, the iframe does not load on Chrome, but loads on Firefox and IE. Any ideas?
 
You 'll have better chances to get a response if you post the relevant code.
 
hey

I have jquery.js and modal.popup.js in index.html header. Here is a part of header:
<script language="javascript" src="js/jquery.js"></script><script language="javascript" src="js/modal.popup.js"></script>
<script language="javascript">


$(document).ready(function() {

var align = 'center';
var top = 100;
var width = 950;
var padding = 10;
var backgroundColor = '#FFFFFF';
var source = 'unlock.html';
var borderColor = '#000';
var borderWeight = 4;
var borderRadius = 5;
var fadeOutTime = 300;
var disableColor = '#666666';
var disableOpacity = 40;
var loadingImage = 'lib/release-0.0.1/loading.gif';


$(".modal").click(function() {
modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
});

$(document).keyup(function(e) {
if (e.keyCode == 27) {
closePopup(fadeOutTime);
}
});
});
</script>

The source of the modal popup is unlock.html which contains this code:
<b><center>Our servers have been overloaded lately. To prove you're not a bot, please enter your email before streaming.</center></b><center><div style="overflow: hidden; width: 899px; height: 60px; position: relative;" id="i_div"><iframe name="i_frame" src="AFF LINK" style="border: 0pt none ; left: -252px; top: -519px; position: absolute; width: 1366px; height: 643px;" scrolling="no"></iframe></div></center>

The way is the modal popup is called in on index.html where you click on an image, code follows:
<center><a class="modal" href="javascript:void(0);"><div id="contentArea" style="margin-left: 30px; margin-right: 30px; width: 705px; height: 360px; background-image:url(image.jpg); border:1px solid black;">
<h3 style="font-weight: bold; color: red; font-size: 16px; font-family: Georgia;" align="center"> </h3>


</div></a></center>

Any ideas why the Iframe in unlock.html will only load in Firefox and IE (not sure about safari) and not chrome?
 
I'm not on a PC to test your code, but given it's a modal pop up, I imagine the iframe CSS with absolute positioning is causing issues. Try resetting it to default styling and see if that works. Also remove the hidden overflow on the div, and see if that helps. If any of those things fix your issue, you can start from there and fix it.
 
Last edited:
I'm not on a PC to test your code, but given it's a modal pop up, I imagine the iframe CSS with absolute positioning is causing issues. Try resetting it to default styling and see if that works. Also remove the hidden overflow on the div, and see if that helps. If any of those things fix your issue, you can start from there and fix it.
I completely removed the style area of it, and it worked in chrome. So what should I do from here, I need it to only show a certain part of the page in the iframe with no scrolling
 
Another update: Just removed the position: absolute; part of the style and it still loads, it just isn't centered the way it appeared with the position: absolute; on IE.

EDIT: If I remove the overflow: hidden and keep the position: absolute it still loads but not with the image I want, shows more than I want it to.

So it's a combination of the two that causes it not to load?
 
Last edited:
If you add me on Skype I may be able to help. Hard to see what the main issue is without seeing the implementation.
 
Back
Top