Hi,
I'm trying to build a web page where the user can insert text
dinamically. When the user hits a button, a new text box is created and
the user can insert text into it.
It's working nice with Firefox 1.0, but it's not working with IE
6.0.2800.1106 (W2K SP4)
function addText() {
doc = document.getEle mentById("deskt op");
myIframe = document.create Element("iframe ");
myIframe.id = "editFrame" ;
myIframe.name = "editFrame" ;
myIframe.style. border = "1px dotted";
myIframe.style. position = "relative";
doc.appendChild (myIframe);
if(document.all ) {
document.editFr ame.document.de signMode = 'On';
} else {
document.getEle mentById("editF rame").contentD ocument.designM ode =
"on";
}
}
I did a test putting it inside an static page (below) and it worked.
<HTML>
<HEAD></HEAD>
<BODY>
<IFRAME NAME="editFrame "></IFRAME>
<SCRIPT>
document.editFr ame.document.de signMode = 'On';
</SCRIPT>
</BODY>
</HTML>
So, is it possible to do it on the fly? Any help?
TIA,
Bob
I'm trying to build a web page where the user can insert text
dinamically. When the user hits a button, a new text box is created and
the user can insert text into it.
It's working nice with Firefox 1.0, but it's not working with IE
6.0.2800.1106 (W2K SP4)
function addText() {
doc = document.getEle mentById("deskt op");
myIframe = document.create Element("iframe ");
myIframe.id = "editFrame" ;
myIframe.name = "editFrame" ;
myIframe.style. border = "1px dotted";
myIframe.style. position = "relative";
doc.appendChild (myIframe);
if(document.all ) {
document.editFr ame.document.de signMode = 'On';
} else {
document.getEle mentById("editF rame").contentD ocument.designM ode =
"on";
}
}
I did a test putting it inside an static page (below) and it worked.
<HTML>
<HEAD></HEAD>
<BODY>
<IFRAME NAME="editFrame "></IFRAME>
<SCRIPT>
document.editFr ame.document.de signMode = 'On';
</SCRIPT>
</BODY>
</HTML>
So, is it possible to do it on the fly? Any help?
TIA,
Bob
Comment