Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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

    Code:
    <div id='leframe' style='visibility:hidden'></div>
    Then, I call, through a Flash file, an external function that says:

    Code:
    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?

    Best regards and thanks in advance.

  • #2
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    3,763
    Thanks
    23
    Thanked 548 Times in 547 Posts
    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';


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •