Welcome to TalkGraphics.com
Results 1 to 10 of 22

Hybrid View

  1. #1
    Join Date
    Feb 2015
    Posts
    12

    Default Problem with white flash on loading content into iframe

    Help please,
    I need to prevent a white flash which appears for a brief moment when my iframe loads some new content on to a web page with a black background. the brief white flash only seems to appear when browsing pages in IE8 or lower. If I understand correctly one possible way to go about solving this is to add an alpha/opacity filter code snippet of some sort to the iframe or page? specifically with IE8 in mind. Would appreciate it if someone could provide me a working example of a way to achieve this in XWD. (example of problem included in attachment)
    thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,520

    Default Re: Problem with white flash on loading content into iframe

    Welcome to TalkGraphics

    I have no idea how to fix this, but check back. One of the more savvy members may have a suggestion.

  3. #3
    Join Date
    Feb 2015
    Posts
    12

    Default Re: Problem with white flash on loading content into iframe

    Hope so Gary, it will take a big weight of my shoulders if someone is able to solve it for me

  4. #4

    Default Re: Problem with white flash on loading content into iframe

    Very few people will still have IE8 installed in order to test this. As the problem is generated by IE8's rendering engine, I recommend updating IE (version 8 has serious security flaws in any case and should not be used, there are alternatives)
    https://www.whatismybrowser.com/guid...is-out-of-date

  5. #5
    Join Date
    Feb 2015
    Posts
    12

    Default Re: Problem with white flash on loading content into iframe

    Point taken Steve,problem is analytic's indicate there is still a fair amount of local visitors to my website who are still using IE8 or lower to browse through it and it's not really an option for me to tell them what browser to use to visit it.I acknowledge I might need to compromise this issue in the site design but googling around suggests there are some successful work around's out there for this problem in IE8, Its just that as yet I haven't got one to work for me in XWD

  6. #6
    Join Date
    Feb 2015
    Posts
    12

    Default Re: Problem with white flash on loading content into iframe

    Thanks Acorn for the help the script posted above hasn't solved the IE8 white flash problem though when implemented into XWD. So still looking for further help and ideas with this issue please.

  7. #7
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,894

    Default Re: Problem with white flash on loading content into iframe

    Quote Originally Posted by scribbler View Post
    Hope so Gary, it will take a big weight of my shoulders if someone is able to solve it for me
    You can try adding the following into the Page header: Page > HTML code (Head):
    Code:
    <script>
    // Prevent variables from being global      
    (function () {
          /*
              1. Inject CSS which makes iframe invisible
          */
        var div = document.createElement('div'),
            ref = document.getElementsByTagName('base')[0] || 
                  document.getElementsByTagName('script')[0];
    
    
        div.innerHTML = '­<style> iframe { visibility: hidden; } </style>';
        ref.parentNode.insertBefore(div, ref);
        /*
            2. When window loads, remove that CSS, 
               making iframe visible again
        */
        window.onload = function() {
            div.parentNode.removeChild(div);
        }
        
    })();
    </script>
    The original detail is here: https://css-tricks.com/prevent-white-flash-iframe/.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Bookmarks

Posting Permissions

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