PRB: Cannot Edit IFRAME in a Web Page Dialog Box in Internet Explorer 5.5 (291125)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q291125

SYMPTOMS

If you call the window.showModalDialog or window.showModelessDialog methods to place an IFRAME in a Web page dialog box, you cannot edit the IFRAME, even if you set the iframe.document.designMode property to "On".

CAUSE

This problem occurs because the iframe.document.designMode="On" property does not work in Internet Explorer 5.5.

RESOLUTION

To resolve this problem, use the new iframe.document.body.contentEditable = "True" property in Internet Explorer version 5.5.

Note: The iframe.document.body.contentEditable = "True" property is not available in Internet Explorer 5.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

Use window.showModalDialog or window.showModelessDialog to open the following HTML file in Internet Explorer 5.5:
<html>
<head>
<SCRIPT LANGUAGE=javascript>
function window_onload() {
	textEdit.document.body.contentEditable = "True"; //This line works in Internet Explorer 5.5,
                                                          // but not in Internet Explorer 5.
	textEdit.document.designMode="On"; //This line works in Internet Explorer 5, 
                                            // but not in Internet Explorer 5.5.
	textEdit.focus();
}
</SCRIPT>
</head>
<body onload="return window_onload()" language="javascript">
<iframe name="textEdit" id="textEdit" width="400" height="280"></iframe>
</body>
</html>
				
Notice that you can edit the textEdit IFRAME in Internet Explorer 5, but not in Internet Explorer 5.5.

REFERENCES

For more information on the MSHTML editing platform in Internet Explorer 5.5, see the following Microsoft Web site: For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbBug kbie550fix kbprb KB291125