Bug 137135 - iframes error loaded in konqueror
Summary: iframes error loaded in konqueror
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-10 02:05 UTC by Gustavo Loaiza Robles
Modified: 2011-06-25 06:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Loaiza Robles 2006-11-10 02:05:50 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs
Compiler:          3.5.4-0.5.fc5 
OS:                Linux

Konqueror doesn't load the iframe's content with document.write inmediately. The solution is to use setTimeout function to give it an extra time.

example:
Error

function actualiza(){
  var cad= '<html><head></head><body>Hello</body></html>';
  window.iframe1.document.open();
  window.iframe1.document.write(cad);
  window.iframe1.document.close();	
		
  return;
}

in the html body
<body> 
  ...
  ...
    <iframe ....>
  <script languaje="javascript">
     actualiza();  //the code fails here
  </script>
</body>


Solution:
function actualiza(){
  var cad= '<html><head></head><body>Hello</body></html>';
  window.iframe1.document.open();
  window.iframe1.document.write(cad);
  window.iframe1.document.close();	
		
  return;
}

in the html body
<body>    
  <body> 
  ...
  ...
  <iframe ....>
  <script languaje="javascript">
     setTimeout('actualiza()', 400);  //this is the solution
  </script>
</body>

</body>
Comment 1 Allan Sandfeld 2006-11-19 17:19:39 UTC
Can you rewrite this into test case that demonstrates what Konqueror does wrong?
Comment 2 FiNeX 2008-04-20 23:08:00 UTC
A testcase could be very helpful!
Comment 3 Martin Koller 2011-06-25 06:47:28 UTC
not reproducible