Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iphone webview and iframe issues
- var ifrm;
- function load(url) {
- ifrm = document.createElement("IFRAME");
- ifrm.setAttribute("src", url);
- ifrm.style.width = "100%";
- ifrm.style.height = "100%";
- ifrm.style.display = "none";
- ifrm.onload = function () {
- document.getElementById('loading').style.display = 'none';
- ifrm.style.display = '';
- }
- document.body.appendChild(ifrm);
- }
- <body>
- ...
- <script>
- //the document is loaded
- //call a function in the parent page
- parent.appObj.iframeLoadedCallback(window);
- </script>
- </body>
Add Comment
Please, Sign In to add comment