Using DesignMode in ASP.NET

M

Marcel Balcarek

I have an IFrame control defined. Is there a way to turn designMode on for
it, so that I can edit text in it using richtext capabilities?

These IFrame controls awill be defined dynamically in code behind . .

Ideally, I would want the solution to work in Netscape too ...

Any part of the solution would be helpful.

Thank you
Marcel
 
M

Marcel Balcarek

1) Part of the solution: In Javascript I can do this: ( per
http://devedge.netscape.com/viewsource/2003/midas/01/ )

Figure 3 : Setting up rich-text editing
HTML:
<body onload="load()">

JavaScript:
function load(){
getIFrameDocument("editorWindow").designMode = "On";
}

function getIFrameDocument(aID){
// if contentDocument exists, W3C compliant (Mozilla)
if (document.getElementById(aID).contentDocument){
return document.getElementById(aID).contentDocument;
} else {
// IE
return document.frames[aID].document;
}
}

2) Now add Javascript attributes to the window load - something like this -
I still need to work it out

myWindow.Attributes.Add("onload", "javascript:load(Pass in each iframe id)")

myWindow.Attributes.Add("onload", "javascript:load(Pass in each iframe id)")

That might do it ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top