faqts : Computers : Programming : Languages : JavaScript : Document

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

62 of 72 people (86%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

What is IE's document.designMode good for?

Mar 6th, 2000 02:44
Martin Honnen, Andy Frescura, http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/designmode.asp


IE4+ only:
By setting
  windowReference.document.designMode = 'On'
you can set a frame or iframe into edit mode where the user can type 
and edit the content. For instance try

<HTML>
<HEAD>

</HEAD>
<BODY ONLOAD="if (document.all) document.editFrame.document.designMode 
= 'On';">
<IFRAME SRC="about:<H1>Kibology for all</H1>" NAME="editFrame"></IFRAME>
</BODY>
</HTML>

and you can type and edit the content of the IFRAME.

www.siteexperts.com uses this intensively to provide some rich text 
editing facilities in its forums. webfx.eae.net also has an example on 
this use.

Note that IE5.5 has probably no support for document.designMode but a 
new editMode for all elements.