Commit 1f09cbbe authored by Ivan Tyagov's avatar Ivan Tyagov

Do not try to set inner object size if it's not already loaded.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43157 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b16d7a0
......@@ -221,8 +221,9 @@ var resizeIFrameOnLoad = function() {\n
var object_list = $("object.auto_height");\n
for( var i=0; i<object_list.length; i++) {\n
var object_document = object_list[i];\n
var doc = object_document.contentDocument.documentElement;\n
object_document.style.height = doc.offsetHeight + \'px\';\n
var inner_frame = object_document.contentDocument;\n
if (inner_frame){\n
object_document.style.height = inner_frame.documentElement.offsetHeight + \'px\';}\n
}\n
}\n
\n
......
12
\ No newline at end of file
14
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment