...

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



marconehilton
12-20-2011, 11:57 AM
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.

marconehilton
12-20-2011, 12: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:

sunfighter
12-20-2011, 03: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';



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum