Solved

document.body.scrollHeight + designMode ON

Posted on 2007-03-21
4
1,282 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you!  That's screwed up--why is document.frames['elem'] any different than document.getElementById('elem')?
0
 
LVL 3

Expert Comment

by:exoska
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now