Guest User

Untitled

a guest
Aug 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. iphone webview and iframe issues
  2. var ifrm;
  3.  
  4. function load(url) {
  5. ifrm = document.createElement("IFRAME");
  6. ifrm.setAttribute("src", url);
  7. ifrm.style.width = "100%";
  8. ifrm.style.height = "100%";
  9. ifrm.style.display = "none";
  10. ifrm.onload = function () {
  11. document.getElementById('loading').style.display = 'none';
  12. ifrm.style.display = '';
  13. }
  14. document.body.appendChild(ifrm);
  15. }
  16.  
  17. <body>
  18. ...
  19. <script>
  20. //the document is loaded
  21. //call a function in the parent page
  22. parent.appObj.iframeLoadedCallback(window);
  23. </script>
  24. </body>
Add Comment
Please, Sign In to add comment