PDA

View Full Version : Unable to set iframe designMode


snoodle
02-21-2008, 10:41 PM
I've found lots of references to this topic on the web but haven't come across anyone with this problem. The output in the alert, below, says "Off" no matter what I set designMode to (so far I've only tried this in IE but all docs I've read say it should work). Help. Thank You.

the below javascript code gets inoked with... <body onload="InitEMailerPage()";...

function InitEMailerPage()
{
var elem = document.getElementById("email_editor_if");
elem.document.designMode="On";
alert(elem.document.designMode)
elem.contentWindow.focus();
}

rnd me
02-22-2008, 12:27 PM
i think elem.document.designMode="On";

should be

document.designMode="On";

i believe it is the "contentEditable" property you apply to individual tags

snoodle
02-22-2008, 12:34 PM
elem.contentWindow.document.designMode = "on"; did the trick.
thanks.