Embed in IFRAME not working in I.E.

0 favourites
  • 10 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Steps to repro:

    1. Export game (any game), even the simplest like this

    2. Upload to example.com/mygame/

    3. On example.com/mygame have a "what.html" file with iFrame to load the game, like

    <iframe

         src="index.html"

         width="900" height="700"

         style="margin-top: 15px; margin-bottom: 15px; width:900px; height:700px;"

         frameborder="0"

         id="my_iframe"

         title="Some_title">

    </iframe>

    4. Open Firefox, navigate to example.com/mygame/what.html: All good, game loads in iFrame

    5. Open Chrome, navigate to example.com/mygame/what.html: All good, game loads in iFrame

    6. Open I.E., navigate to example.com/mygame/what.html:

    Expected result: All good, game loads in iFrame

    Actual result: "Your browser does not appear to support HTML5. Try upgrading your browser to the latest version."

    The way I "architected" my game, it kind of needs to run in an iframe.

    Please advise <img src="smileys/smiley17.gif" border="0" align="middle">

  • This sounds like an IE bug (since it works correctly in Chrome and FF).

    Report the bug to microsoft/IE developpers.

    A quick search on google sent me to this article.

  • Thanks Kyatric. Well, there's many things which work on Chrome and FF and not on I.E. and not all are I.E. bugs. Also there's things which work on I.E. and not on the others :). I do agree tho that this sounds like an I.E. bug and I might even report it tomorrow (too late night right now...), but I won't get my hopes high on them fixing anything anytime soon.

    In the meantime, anybody know of a workaround?

    Thanks.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, there's many things which work on Chrome and FF and not on I.E. and not all are I.E. bugs.

    I'd be curious to hear more about that.

  • It's not a bug, you need to make sure the parent web page has the following tag on it:

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8" />

    Otherwise if the parent page forces IE9 to render in IE8 document mode, it forces all iframes to use the same mode which breaks HTML5 games (since IE8 doesn't support HTML5). C2's exported HTML uses that tag but it's overridden if placed in an iframe. Can you try adding that tag to your page and let me know if it fixes it?

  • Ashley: Thanks, but nope, sorry, doesn't fix it, still getting the same error. Where should I add this? I put it between the <head> and </head>...

    Kyatric: well, I encountered things every now and then, but that was quite some time ago when I was more into this web stuff. Getting back into it now with C2, I see things have changed and it's become a lot easier than it used to be. Perhaps you're right and things are different now, I do agree that I.E. is the most troublesome browser.

  • Geo it's definitely the issue, it's IE's documents mode not a Construct 2 bug. Can you link to the page in question so I can have a look myself?

  • Ashley, you are correct. I could swear I got the same error last night, now it seems to be working (fixed itself, as they say). Must have been the I.E. cache again at work... Sorry for the trouble, and thanks for the suggestion, it does work.

  • Well, there are many things that work in Firefox and Chrome but not I.E. I'll give you an example...CSS3/HTML5 is one of those things. That doesn't mean it's a bug it just means IE chose not to support HTML5 in the way that Chrome and Firefox have.

  • leesaenz - this is an old thread from January and it was resolved as an issue to do with IE documents mode rather than missing features. Please be wary about bumping old threads.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)