Advertisement

04.15.2008 at 08:21AM PDT, ID: 23324032 | Points: 50
[x]
Attachment Details

css expression crashes IE

Asked by ram_0218 in Cascading Style Sheets (CSS), JavaScript

i've an Iframe in my page,

<IFRAME ID=CONTENT_FRAME SRC=BLAHBLAHBLAH STYLES='height:0px; width:0px;' > </IFRAME>

the iframe source can be dynamically changing as the user clicks happen. so to calculate the height of the iframe everytime the content changes, i've set an expression during body onload.

                  try{document.getElementById('CONTENT_FRAME').style.setExpression('height','document.getElementById("CONTENT_FRAME").Document.body.scrollHeight); }catch(err) {}  // crashes..

but this line crashes IE on some apges and some pages it works fine.. can someone pls tell me whats happening here and also suggest me a workaround. i know its getting into infinite loop or something. i'm working with IE only and resize event capturing technique is not covering 100% scenerios i've.. thats why i use expression

Start Free Trial
[+][-]04.15.2008 at 02:44PM PDT, ID: 21363127

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628