Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrolling height of IFrame
Message
From
21/11/2012 03:26:20
 
 
To
20/11/2012 23:12:34
General information
Forum:
Javascript
Category:
IFrame
Miscellaneous
Thread ID:
01557719
Message ID:
01557726
Views:
29
>This code is good. However, I was executing it based on the existence of the loading of the frame where IE makes the object available when completed where Firefox and Chrome make the object available as soon as it is processed. Thus, the code was executing too fast for those two browsers. I have adjusted the code to plug the function to execute in the IFrame object onload event.
>
>So, this results in the same situation as before. In the function, I have an alert box. That alert box is shown before the frame becomes visible. This shouldn't be. Because the IFrame onload event should only occur when the frame has completed its loading process.
>
>
>      loIFrame=document.getElementById('IFrameMenu')
>      loIFrame.onload=ResizeEnvironment(nBrowserWidth)
>
Does this help: http://stackoverflow.com/questions/4548984/detect-if-the-iframe-content-has-loaded-successfully
 <script type="javascript"> var iframe = document.createElement("iframe"); iframe.src = "http:/ <script type="javascript">
var iframe = document.createElement("iframe");
iframe.src = "http://www.your_iframe.com/";
if (navigator.userAgent.indexOf("MSIE") > -1 && !window.opera) {
  iframe.onreadystatechange = function(){
    if (iframe.readyState == "complete"){
      alert("Iframe is now loaded.");
    }
  };
} else {
  iframe.onload = function(){
    alert("Iframe is now loaded.");
  };
}
</script>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform