Solved

document.body.scrollHeight + designMode ON

Posted on 2007-03-21
4
1,287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Timer on div 5 24
PHP Web Development 6 28
Session on Html 8 41
Check input text, Number 7 34
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

733 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