Advertisement

08.01.2008 at 12:37PM PDT, ID: 23615195 | Points: 500
[x]
Attachment Details

Iframe width?

Asked by ram_0218 in JavaScript

I've an iframe thats loaded with content from same domain. I have a inline style for iframe as width: 100%;

I try to get the content width of the iframe as:
document.getElementById('iframe').Document.body.offsetWidth or scrollWidth - these properties always give me the screen width due to the style (100% width) I gave.

If I remove width=100% inline style, these properties give me actual content width but the problem is during loading the data in iframe, it displays a cut-off content and once the body is loaded completely shows up the whole screen.. any tips? Start Free Trial
[+][-]08.01.2008 at 12:42PM PDT, ID: 22141381

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.02.2008 at 04:19AM PDT, ID: 22143965

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628