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
Solved

document.body.scrollHeight + designMode ON

Posted on 2007-03-21
4
1,286 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

792 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