plicatibu Posted January 29, 2014 Share Posted January 29, 2014 Hi. I am using the following code in order to show iframed games and it's working fine on Android (Opera, Firefox, Chrome and stock browser), but on iPhone the games are not showing anymore. Sometimes it even closes the Safari. Could someone tell me what is wrong? I'm pretty sure it is something with my JavaScript code but I can figure out what is.<html><head><meta charset="utf-8"><title>game name</title><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta http-equiv="Content-Language" content="en"/><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" /><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black"/><meta name="HandheldFriendly" content="true" /><meta name="mobile-web-app-capable" content="yes" /><style>html, body { margin: 0; weight:100%; height:100%;}#ifr { height: 100%; width: 100%; marginheight: 0; marginwidth: 0; frameBorder: 0;}</style><script><!--function autoResize() { var iframe = document.getElementsByTagName( 'iframe' )[0]; iframe.width = window.innerWidth; iframe.height = window.innerHeight }//--></script></head><body onresize="autoResize();"><iframe id="ifr" src="games/mygame/index.html" onload="autoResize();" seamless></iframe></body></html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.