View Full Version : Issue on loading .html into an iframe (which is inside a div tag)

12-20-2011, 12:57 PM
Hi, folks!

Having a big issue here: i got a code that works fine in Chrome, FF, but seems unreadable by IE.

Got a main HTML code that have a DIV tag, declared like this

<div id='leframe' style='visibility:hidden'></div>

Then, I call, through a Flash file, an external function that says:

function loadNextPg(nextPg) {
var varDiv = "<iframe src='pg"+nextPg+".htm'></iframe>";
document.getElementById("leframe").innerHTML = varDiv;

It would load the HTML named (pg'+nextPg+'.htm), where nextPg is a String value ("01", "02", etc).

It works WONDERFULLY in Chrome, FF, etc, but not in IE.

Does anyone know if I'm doing anything wrong? :confused:

Best regards and thanks in advance.

12-20-2011, 01:42 PM
Solved, guys.

I am dynamically loading an HTML file.

But somehow, Internet Explorer can't manage with the "visibility:hidden" setting.

And it simply won't cache next page.

When i remove the visibility settings, the thing works like a charm. :thumbsup:

12-20-2011, 04:35 PM
In reality this does not solve your problem, but bypasses (hides) it.
To solve the visibility settings of IE you need to make things visible the correct way
not document.getElementById("leframe").innerHTML = varDiv;
but document.getElementById('leframe').style.visibility='visible';