Solved

document.body.scrollHeight + designMode ON

Posted on 2007-03-21
4
1,285 Views
Last Modified: 2013-12-08
I have an iframe with designMode ON.  For some reason elem.document.body.scrollHeight DOES NOT change in MSIE as you add content to the element (which is editable because of designMode).  I've tested it in both MSIE 6 and 7.  Anyone know what I'm doing wrong?
0
Comment
Question by:inxil
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
exoska earned 500 total points
ID: 18765657
document.frames.<frameNameHere>.document.body.scrollHeight

should work out for IE.

and for some more cross-browser look

window.frames.<frameNameHere>.document.body.scrollHeight
0
 
LVL 3

Expert Comment

by:exoska
ID: 18765711
for some instance

here is the main Page:
<HTML>
<HEAD>

</HEAD>
<BODY ONLOAD="document.editFrame.document.designMode= 'On';">
<IFRAME SRC="New3.html" NAME="editFrame"></IFRAME>
</BODY>
</HTML>


here is the iframe : New3.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <title></title>
  </head>
  <body >
afasfafa
<script>
document.designMode='on' //mooz
</script>
  </body>
</html>
0
 
LVL 7

Author Comment

by:inxil
ID: 18766048
Thank you!  That's screwed up--why is document.frames['elem'] any different than document.getElementById('elem')?
0
 
LVL 3

Expert Comment

by:exoska
ID: 18766100
buddy there are some words on it at msdn, you might want to check out.
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/iframe.asp
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Make Line Items Look Good Over Mobile 2 60
Can not open the Access Help ? 3 53
add a 3rd selection to sum 7 29
how can i Return this word's max repeat count? 2 18
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question